misc/77651: init can loose shutdown related signals

Sandeep Kumar sandkumar at juniper.net
Thu Feb 17 11:20:14 PST 2005

>Number:         77651
>Category:       misc
>Synopsis:       init can loose shutdown related signals
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 17 19:20:13 GMT 2005
>Originator:     Sandeep Kumar
>Release:        4.10
Juniper Networks
FreeBSD bbuild26 4.10-PRERELEASE-20040428 FreeBSD 4.10-PRERELEASE-20040428 #0: Tue May 18 11:57:20 PDT 2004     root at bbuild26.juniper.net:/usr/src/sys/compile/bbuild26  i386

When init receives SIGHUP, the state machine's requested_transition is changed to clean_ttys. Lets say SIGTERM is received while we are in clean_ttys, it will set requested_transition to death. But at the end of clean_ttys it will return multi_user directly which then resets requested_transition. So we loose the SIGTERM sent by shutdown  
Create a big /etc/ttys.
kill -1 1; shutdown -r now

Lot of times the machine will not reboot.
While returning, clean_ttys should check if requested_transition is
no longer clean_ttys and then return requested_transition
instead of multi_user

More information about the freebsd-bugs mailing list