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

Re: [tor-bugs] #23696 [Core Tor/Tor]: Bug: scheduler_kist.c:520: kist_scheduler_schedule: Non-fatal assertion !((diff < 0)) failed.



#23696: Bug: scheduler_kist.c:520: kist_scheduler_schedule: Non-fatal assertion
!((diff < 0)) failed.
-------------------------------------------------+-------------------------
 Reporter:  cypherpunks                          |          Owner:  (none)
     Type:  defect                               |         Status:
                                                 |  needs_information
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.2.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.3.2.1-alpha
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-client, tor-sched, easy,         |  Actual Points:
  0.3.2.2-alpha-must                             |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by dgoulet):

 * status:  reopened => needs_information


Comment:

 Replying to [comment:13 cypherpunks]:
 > After hibernation on Windows 7:

 But before that, it was running properly right? So it basically was
 running then hibernation and then came back and boom?

 Do you recall the length of time that it was in hibernation? Was it in the
 range of minutes or days?

 > {{{
 > Tor WARN: tor_bug_occurred_(): Bug: scheduler_kist.c:530:
 kist_scheduler_schedule: Non-fatal assertion !((diff < 0)) failed. (Future
 instances of this warning will be silenced.) (on Tor 0.3.2.4-alpha )
 > Tor WARN: Bug: Non-fatal assertion !((diff < 0)) failed in
 kist_scheduler_schedule at scheduler_kist.c:530. (Stack trace not
 available) (on Tor 0.3.2.4-alpha )
 > }}}

 This is very surprising, it basically means that we got the last scheduler
 run in the future from "now" but both should be monotonic. Even if the
 last run is 0, the diff should be positive...

 Looking at our Windows compat call for `monotonic_get()`, I see this
 comment:

 {{{
   /* Alas, QueryPerformanceCounter is not always monotonic: see bug list
 at

     https://www.python.org/dev/peps/pep-0418/#windows-
 queryperformancecounter
    */
 }}}

 Which means that I would assume here we aren't getting a monotonic time at
 all and this warning is printed. Fortunately, this is harmless because we
 adjust the diff value back to 0 in this case and the scheduler will become
 active which is what we want.

 Considering that we can't guarantee monotonic time it seems, we should
 probably remove the `IF_BUG_ONCE()`... Or make it `log_info()` maybe...

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23696#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs