[tor-bugs] #7043 [Tor]: Tor reports clock jumps when no actual clock jumps occurred

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Dec 29 15:45:03 UTC 2013


#7043: Tor reports clock jumps when no actual clock jumps occurred
--------------------------+------------------------------
     Reporter:  joergent  |      Owner:
         Type:  defect    |     Status:  new
     Priority:  normal    |  Milestone:  Tor: unspecified
    Component:  Tor       |    Version:  Tor: 0.2.3.22-rc
   Resolution:            |   Keywords:  time tor-relay
Actual Points:            |  Parent ID:
       Points:            |
--------------------------+------------------------------

Comment (by cypherpunks):

 Did you noticed very odd arithmetic:
 {{{
 Oct 04 14:54:50.000 [warn] Your system clock just jumped 100 seconds
 forward; assuming established circuits no longer work.
 Oct 04 14:56:40.000 [notice] Giving up on marked_for_close conn that's
 been flushing for 15s (fd -1, type Socks, state waiting for circuit).
 Oct 04 14:56:41.000 [warn] Your system clock just jumped 111 seconds
 forward; assuming established circuits no longer work.
 }}}
 clock jumped of 111s since last jump, but [notice] about give up on
 connection called by run_scheduled_events() from the same
 second_elapsed_callback() that counts elapsed seconds and warns about
 clock jumps. That means (now - current_second) was less than 100s just for
 previous call of second_elapsed_callback(). If it was really jump of clock
 then difference between timestamps for [notice] and [warn] was more than
 1s.

 That means time(NULL) returns cached (or something) values, and only
 sometime updates it (after 1-2 minutes) to real values.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7043#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list