Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2006 11:47:41 -0400
From:      Michael Scheidell <scheidell@secnap.net>
To:        freebsd-hackers@freebsd.org
Subject:   FBSD 5.5 and software timers
Message-ID:  <44C4EB9D.1060106@secnap.net>

next in thread | raw e-mail | index | archive | help
I had a 200ms software timer running in FBSD 5.4 that isn't working in 
5.5 now.
This software timer was resetting a 1 second hardware watchdog timer.
Every 200ms, I sent a reset to the hardware WDT.
Everything worked on 5.4, but I am getting failures on 5.5
It appears that something changed in ntpd, clock_gettime, or nanosleep.
I can 'fix' it by specifying -x in ntpd (slew even if large change), but 
after a day, time is off by more than 5 mins.

I think all I did was upgrade from 5.4 to 5.5

It fails within 1 second of getting these types of log entries:
Jul 23 15:03:42 audit18 ntpd[473]: time reset -2.497234 s
Jul 23 16:03:56 audit18 ntpd[473]: time reset +1.532401 s

if -2.49, and we were inside of the nanosleep() and I was expecting a 
200ms sleep, I get 2600ms.
(yes, I think I do.  the 1 second hardware timer on the WDT triggers if 
not reset every 1000ms (1 second))

if +1.53, I have to do some hard thinking since my nanosleep() APPEARS 
to have happened in -1330 ms.

Oh, did I mention, this worked on 5.4? and if a prevent the 'time reset' 
log entries by adding the -x switch to ntpd I don't get failures? 
(except that the clock drifts about 2 seconds per hour!)
Also, 5.4 also showed alternating -2 and +2 second time resets, about 
once an hour, but it didn't seem to affect nanosleep().

ntpd using strata 2 ntp server, with 2 other backups.
ntpdc -c peers shows drift when using -x option. (no different then 5.4 did)

-- 
Michael Scheidell, CTO
SECNAP Network Security / www.secnap.com
scheidell@secnap.net  / 1+561-999-5000, x 1131




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44C4EB9D.1060106>