#25768 closed enhancement (implemented)

doctor should check for clock skew on dir auths

Reported by: arma Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/DocTor Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

In #25756 we discovered that it can actually produce a user-visible complaint when dizum has its clock wrong by 65 seconds.

Specifically, when the combination of skew from the dir auth and from the relay doing the fetch sum to more than 60 seconds, then if the relay decides to update its consensus at just the right time, the relay will get a warn message.

It would be great if doctor checked the Date: header on dir auth responses, and did something smart if it's not right enough.

Note that the Date header gets chosen when the dir auth begins to respond to the request, so if it takes 25 seconds to finish downloading the request, you shouldn't decide that the Date was wrong by 25 seconds.

Child Tickets

Change History (2)

comment:1 Changed 18 months ago by arma

Also note that I filed nearly the same ticket for consensus-health in #25767 -- I wonder if there is some better way to handle overlapping functionality in the future.

comment:2 Changed 18 months ago by atagar

Resolution: implemented
Status: newclosed

Good idea, Roger. Pushed a little Stem change to surface response headers...

https://gitweb.torproject.org/stem.git/commit/?id=187d37661f06ed0db754d43f299be68ce1e78f7b

... and added a notification when clocks are off by at least ten seconds...

https://gitweb.torproject.org/doctor.git/commit/?id=5399092235e6d1f74841347b01adddaf9df63d3a

Presently this is generating notices for dizum...

maatuska: 0.406214 seconds
tor26: 0.03344 seconds
Bifroest: 0.369906 seconds
longclaw: 0.779489 seconds
dizum: 68.061756 seconds
bastet: 0.290902 seconds
gabelmoo: 0.348548 seconds
moria1: 0.801659 seconds
dannenberg: 0.002416 seconds
Faravahar: 0.411186 seconds

Also note that I filed nearly the same ticket for consensus-health in #25767 -- I wonder if there is some better way to handle overlapping functionality in the future.

Consensus-health provides a dashboard whereas DocTor is a notification framework. In this case I think DocTor is a better fit since there's really not much to visualize. But if having a website that displays clock deltas of all the authorities would be helpful then Tom can copy what I did in DocTor. It's not much code.

Note: See TracTickets for help on using tickets.