|Summary:||init(8): "init q" in single user causes segfault|
|Product:||Base System||Reporter:||Matthias Andree <mandree>|
|Component:||bin||Assignee:||freebsd-bugs (Nobody) <bugs>|
|Severity:||Affects Only Me||CC:||ngie|
Description Matthias Andree 2011-02-25 14:00:24 UTC
"init q" in single-user mode causes init to segfault, and subsequently the kernel to panic (..."going nowhere without my init") How-To-Repeat: boot into single-user at loader prompt enter root /bin/sh type "init q" and press enter
Comment 1 Jaakko Heinonen 2011-06-08 15:30:39 UTC
State Changed From-To: open->patched I was able to reproduce this on 8.2-RELEASE but not on 9.0-CURRENT. I guess that this has been fixed in r217750.
Comment 2 Matthias Andree 2011-06-08 15:52:49 UTC
Comment 3 Jilles Tjoelker 2011-07-03 17:48:58 UTC
> [r217750 fixes segfault on "init q" in single user] Commit r217750 certainly fixes that segfault (deliberately) but also makes it such that /etc/rc.shutdown is not executed if /etc/rc was not finished. That change fixes some things (like losing mixer settings when using shutdown or ctrl+alt+del from single user) but might also break expectations. Perhaps it is indeed safe enough. -- Jilles Tjoelker
Comment 4 Enji Cooper 2015-10-25 21:33:01 UTC
The symptom noted in the description can no longer be hit as noted in comment # 1 and comment # 3. Closing this bug even though the commit was not MFCed because 8.x has been EOLed. Please open a new bug for the item noted in comment # 3 if you believe it /etc/rc.shutdown should be run again if `init q` is interrupted -- although, I personally think the problem is that certain scripts like mixer need to be taught to do the right thing each time they're stopped instead of going and corrupting state.