Opened 2 years ago

Last modified 2 years ago

#26713 new defect

relays should explicitly dirty their descriptors on entering/exiting hibernation, rather than implicitly doing it by triggering a bandwidth change

Reported by: arma Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-relay hibernation
Cc: juga Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Motivated by the #24104 fixes:

Currently Tor notices that it's gone into hibernation, and should publish a new descriptor saying so, when it calls check_descriptor_bandwidth_changed() and it decides "cur" is 0 and that's sufficiently different than the last bandwidth, so it dirties its descriptor with reason "bandwidth has changed".

Similarly, in that same function, when we stop hibernating we notice because cur is not zero but the last published bandwidth number was 0.

That "implicitly notice if we've hibernated" logic makes it really easy to have surprises here. For example, in #24104, we almost changed it so you don't notice the start of hibernation if your uptime is more than 24 hours.

We should back out the new hack in #24104 that made an exception when we're hibernating, and then add new explicit mark-my-descriptor-dirty lines when we enter hibernation and when we exit it.

Child Tickets

Change History (2)

comment:1 Changed 2 years ago by asn

Keywords: tor-relay hibernation added
Milestone: Tor: unspecified

comment:2 Changed 2 years ago by juga

Cc: juga added
Note: See TracTickets for help on using tickets.