[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Strange numbers from gettimeofday(2)
Sometimes, gettimeofday(2) will return large negative numbers for the
tv_usec field; this has been happening spontaneously, but I've been
able to reproduce it by either pausing or ddb-breaking a domU for a
few seconds (the exact interval varies on different hardware).
As one might expect, things like cron(8) aren't at their best when the
clock suddenly moves back and forth by two billion microseconds ~=
half an hour, and I've seen this confusion of time in syslog
The system where it's been causing problems by occurring without
suspending the system is hyperthreaded, and others where it's not
aren't; this may or may not be coincidence.
Fixing the integer overflow in get_tsc_offset_ns() neither fixes this
nor seems to make it worse.
I'm attempting to look into this, and welcome suggestions.
(let ((C call-with-current-continuation)) (apply (lambda (x y) (x y)) (map
((lambda (r) ((C C) (lambda (s) (r (lambda l (apply (s s) l)))))) (lambda
(f) (lambda (l) (if (null? l) C (lambda (k) (display (car l)) ((f (cdr l))
(C k))))))) '((#\J #\d #\D #\v #\s) (#\e #\space #\a #\i #\newline)))))
Main Index |
Thread Index |