[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Clock problems

     On Sun, 8 Mar 2009 21:16:54 -0400 downie - <downgeoff2@xxxxxxxxxxx>
>I've had the following show up in my logs several times now=2C but not ever=
>y time:
>"[warn] Your system clock just jumped 160 seconds forward=3B assuming estab=
>lished circuits no longer work."
>There are big blocks of these errors occuring 3 minutes 40 seconds or so ap=
>art=2C for 3 hours.
>The reported clock jump is always 150-170 seconds=2C and always forwards.
>After the warnings there are
>"[notice]Tried for 120 seconds to get a connection to [scrubbed]:80. Giving=
> up. (waiting for circuit)
>[notice] Tor has successfully opened a circuit. Looks like client functiona=
>lity is working."
> If my clock had actually jumped that much it would be wildly incorrect by =
>I'm running Tor (r18423) on OSX10.3.9 (kqueue disabled) as a relay=
     This is the "clock jump" problem that I reported here a number of times
last year.  It can be triggered by an interruption in transmission of data
over your Internet connection for a period exceeding
NUM_JUMPED_SECONDS_BEFORE_WARN seconds (see src/or/main.c).  Currently, that
is 100 seconds.  tor interprets this situation as meaning that it is running
on a system that has just awakened from suspension/hibernation, so it marks
all OR connections (and circuits over them) as having expired.  It has been
quite a few months since my relay last suffered from this situation, so I
don't remember now whether it also results in publication of a new descriptor
as if the relay had just been reinitialized.
     In the short run, you can work around the problem with the patch below,
which will reduce broken connections but will not stop the holdups nor their
effect upon the tor network.  The better, longer-term solution is most likely
to fire your ISP and hire a better one, which is what I did at the earliest

 ---------->8 start of clockjump patch to 8<------------------
*** main.c	2009/02/10 16:35:05	0.1
--- main.c	2009/02/10 16:40:15
*** 1200,1206 ****
  /** If more than this many seconds have elapsed, probably the clock
   * jumped: doesn't count. */
    if (seconds_elapsed < -NUM_JUMPED_SECONDS_BEFORE_WARN ||
        seconds_elapsed >= NUM_JUMPED_SECONDS_BEFORE_WARN) {
--- 1200,1206 ----
  /** If more than this many seconds have elapsed, probably the clock
   * jumped: doesn't count. */
    if (seconds_elapsed < -NUM_JUMPED_SECONDS_BEFORE_WARN ||
        seconds_elapsed >= NUM_JUMPED_SECONDS_BEFORE_WARN) {
 ---------->8 end of clockjump patch to 8<--------------------

I haven't tried this on, but this area of the code seems to change
fairly infrequently, so patch(1) can usually deal with changes in the line
numbers from release to release.  Or you can change "100" to "300" by hand,
or course. :-)

                                  Scott Bennett, Comm. ASMELG, CFIAG
* Internet:       bennett at cs.niu.edu                              *
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."                                               *
*    -- Gov. John Hancock, New York Journal, 28 January 1790         *