Bug 5255 - sysctl kern.boottime is not read only
Summary: sysctl kern.boottime is not read only
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 2.2.5-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1997-12-09 01:10 UTC by joes
Modified: 1998-04-06 08:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description joes 1997-12-09 01:10:01 UTC
Over time, the data returned by sysctl(kern.boottime) is skewed ... for
example:

Sat Nov 29 21:36:17 PST 1997
kern.boottime: { sec = 880867830, usec = 0 } Sat Nov 29 21:30:30 1997
Sat Nov 29 22:30:00 PST 1997
kern.boottime: { sec = 880867828, usec = 733834 } Sat Nov 29 21:30:28 1997
Sat Nov 29 23:45:00 PST 1997
kern.boottime: { sec = 880867827, usec = 680276 } Sat Nov 29 21:30:27 1997
Sun Nov 30 00:45:00 PST 1997
kern.boottime: { sec = 880867826, usec = 988332 } Sat Nov 29 21:30:26 1997
Sun Nov 30 02:45:00 PST 1997
kern.boottime: { sec = 880867825, usec = 623820 } Sat Nov 29 21:30:25 1997
Sun Nov 30 03:30:00 PST 1997
kern.boottime: { sec = 880867824, usec = 945270 } Sat Nov 29 21:30:24 1997
Sun Nov 30 05:00:00 PST 1997
kern.boottime: { sec = 880867823, usec = 980113 } Sat Nov 29 21:30:23 1997
Sun Nov 30 06:45:00 PST 1997
kern.boottime: { sec = 880867822, usec = 675318 } Sat Nov 29 21:30:22 1997
Sun Nov 30 07:45:01 PST 1997
kern.boottime: { sec = 880867821, usec = 980755 } Sat Nov 29 21:30:21 1997
Sun Nov 30 09:00:01 PST 1997
kern.boottime: { sec = 880867820, usec = 955125 } Sat Nov 29 21:30:20 1997
Sun Nov 30 10:45:01 PST 1997
kern.boottime: { sec = 880867819, usec = 739823 } Sat Nov 29 21:30:19 1997
Sun Nov 30 12:15:01 PST 1997
kern.boottime: { sec = 880867818, usec = 662801 } Sat Nov 29 21:30:18 1997
Sun Nov 30 13:45:00 PST 1997
kern.boottime: { sec = 880867817, usec = 612796 } Sat Nov 29 21:30:17 1997
Sun Nov 30 14:30:01 PST 1997
kern.boottime: { sec = 880867816, usec = 971024 } Sat Nov 29 21:30:16 1997
Sun Nov 30 16:15:01 PST 1997
kern.boottime: { sec = 880867815, usec = 838620 } Sat Nov 29 21:30:15 1997
Sun Nov 30 17:30:00 PST 1997
kern.boottime: { sec = 880867814, usec = 846340 } Sat Nov 29 21:30:14 1997
Sun Nov 30 18:45:00 PST 1997
kern.boottime: { sec = 880867813, usec = 828280 } Sat Nov 29 21:30:13 1997
Sun Nov 30 20:15:01 PST 1997
kern.boottime: { sec = 880867812, usec = 732402 } Sat Nov 29 21:30:12 1997
Sun Nov 30 21:00:00 PST 1997
kern.boottime: { sec = 880867811, usec = 963056 } Sat Nov 29 21:30:11 1997
Sun Nov 30 22:45:01 PST 1997
kern.boottime: { sec = 880867810, usec = 828541 } Sat Nov 29 21:30:10 1997
Sun Nov 30 23:45:02 PST 1997
kern.boottime: { sec = 880867811, usec = 120666 } Sat Nov 29 21:30:11 1997
Mon Dec  1 00:15:00 PST 1997
kern.boottime: { sec = 880867810, usec = 845909 } Sat Nov 29 21:30:10 1997
Mon Dec  1 01:30:00 PST 1997
kern.boottime: { sec = 880867809, usec = 708468 } Sat Nov 29 21:30:09 1997
Mon Dec  1 02:30:00 PST 1997
kern.boottime: { sec = 880867808, usec = 897544 } Sat Nov 29 21:30:08 1997
Mon Dec  1 03:45:01 PST 1997
kern.boottime: { sec = 880867807, usec = 930504 } Sat Nov 29 21:30:07 1997
Mon Dec  1 05:15:00 PST 1997
kern.boottime: { sec = 880867806, usec = 962364 } Sat Nov 29 21:30:06 1997
Mon Dec  1 06:30:00 PST 1997
kern.boottime: { sec = 880867805, usec = 959873 } Sat Nov 29 21:30:05 1997
Mon Dec  8 16:30:01 PST 1997
kern.boottime: { sec = 880867678, usec = 957445 } Sat Nov 29 21:27:58 1997
Mon Dec  8 16:45:00 PST 1997
kern.boottime: { sec = 880867678, usec = 957445 } Sat Nov 29 21:27:58 1997

more data available upon request.

I believe this to be some sort of interaction with xntpd, however, I have
not been able to find out where the skew is happening.

Fix: 

Don't run xntpd.
How-To-Repeat: 
Run a 2.2.5-STABLE kernel with xntpd.

Here is my /etc/ntp.conf file:

server 16.1.0.4
server 128.115.14.97
server 192.43.244.18
server 199.2.96.59
server 192.5.41.41
driftfile /etc/ntp.drift
Comment 1 Steve Price freebsd_committer freebsd_triage 1997-12-14 18:43:34 UTC
Responsible Changed
From-To: gnats-admin->freebsd-bugs

Misfiled PR. 
Comment 2 Poul-Henning Kamp freebsd_committer freebsd_triage 1998-04-06 08:03:34 UTC
State Changed
From-To: open->closed

boottime has never been constant (which has nothing to do with it being 
read-only in sysctl), it is the currently best estimate of what time 
the system was booted.