diff options
author | David Goulet <dgoulet@torproject.org> | 2017-12-04 12:22:02 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-12-04 12:22:02 -0500 |
commit | ff6c8cf8617637e0fef28268a3e8ee0b1b4d98fb (patch) | |
tree | b6cffc416183a43553514b0ba016104cf622237b /src/or/scheduler_kist.c | |
parent | b86c9acac360c23749f007c29f1bdd7b8347c18d (diff) | |
download | tor-ff6c8cf8617637e0fef28268a3e8ee0b1b4d98fb.tar.gz tor-ff6c8cf8617637e0fef28268a3e8ee0b1b4d98fb.zip |
sched: Downgrade warning log to info in KIST
Some platforms don't have good monotonic time support so don't warn when the
diff between the last run of the scheduler time and now is negative. The
scheduler recovers properly from this so no need to be noisy.
Fixes #23696
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/scheduler_kist.c')
-rw-r--r-- | src/or/scheduler_kist.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/scheduler_kist.c b/src/or/scheduler_kist.c index d1726ba345..fea92705d4 100644 --- a/src/or/scheduler_kist.c +++ b/src/or/scheduler_kist.c @@ -525,9 +525,13 @@ kist_scheduler_schedule(void) monotime_get(&now); /* If time is really monotonic, we can never have now being smaller than the - * last scheduler run. The scheduler_last_run at first is set to 0. */ + * last scheduler run. The scheduler_last_run at first is set to 0. + * Unfortunately, not all platforms guarantee monotonic time so we log at + * info level but don't make it more noisy. */ diff = monotime_diff_msec(&scheduler_last_run, &now); - IF_BUG_ONCE(diff < 0) { + if (diff < 0) { + log_info(LD_SCHED, "Monotonic time between now and last run of scheduler " + "is negative: %" PRId64 ". Setting diff to 0.", diff); diff = 0; } if (diff < sched_run_interval) { |