Subject: kern/2962: realitexpire() hates big time lumps.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <leo@wau.mis.ah.nl>
List: netbsd-bugs
Date: 11/26/1996 10:00:16
>Number:         2962
>Category:       kern
>Synopsis:       realitexpire() hates big time lumps.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 26 01:05:00 1996
>Last-Modified:
>Originator:     Leo Weppelman
>Organization:
	Private site.
>Release:        1.2
>Environment:
	
System: NetBSD hades 1.2 NetBSD 1.2A (HADES) #5: Mon Oct 7 12:42:48 MET DST 1996 leo@hades:/usr/src/sys/arch/atari/compile/HADES atari


>Description:
	After turning inittodr() into a NoOp and setting the date from /dev/rtc
in single user-mode. The system freezes as soon as the first real-timeout
occurs (update was running). This is caused by realitexpire() trying to
calculate the next timeout. As this is done mostly at splclock, the system
nearly freezes. As soon as the next timeout value exeeds current time, the
system starts to behave normal again.
>How-To-Repeat:
	Add a 'return' before the normal body of inittodr(). Reboot the system
in single user mode, mount filesystems and start update. Set the correct
time with date(1) and hit '^D' to enter multi-user mode. Notice the system
turning silent after a while.
>Fix:
	The best thing I can think of currently is limiting the number of
iterations in the 'forever' loop to some arbitrary number (say 20). When this
limit is exeeded, bump the process' realtimer and schedule the timeout.
>Audit-Trail:
>Unformatted: