Bug 191302 - [kernel] add short sleep in sys/kern/init_main.c before panic() ?
Summary: [kernel] add short sleep in sys/kern/init_main.c before panic() ?
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Colin Percival
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2014-06-23 11:18 UTC by Kurt Jaeger
Modified: 2018-11-26 08:36 UTC (History)
3 users (show)

See Also:
koobs: mfc-stable10+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kurt Jaeger freebsd_committer freebsd_triage 2014-06-23 11:18:11 UTC
Recently, while building a new system, I had the case that init was not found after boot.

Problem was that the message at line 801 of sys/kern/init_main.c
was displayed and disappeared so fast that I had to *film* the
boot sequence and look at it in slow-motion to find the cause of the reboot.

Would it be possible to add a short wait (2-3 seconds) before the
panic() call ?

Film available on request 8-}
Comment 1 Hiren Panchasara freebsd_committer freebsd_triage 2014-06-26 20:41:49 UTC
Hum...should you not disable "reboot on panic" to know/understand what is going on? 
Introducing a delay just to see the panic string doesn't seem like a good idea to me.
Comment 2 Ed Maste freebsd_committer freebsd_triage 2014-06-27 18:22:48 UTC
Is this what you want, from sys/conf/NOTES:

# Set the amount of time (in seconds) the system will wait before               
# rebooting automatically when a kernel panic occurs.  If set to (-1),          
# the system will wait indefinitely until a key is pressed on the               
# console.                                                                      
options         PANIC_REBOOT_WAIT_TIME=16
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2014-08-01 20:32:54 UTC
The crash and clear screen was so fast that I did not even see that it
was a panic. Most other panics had the message about "press a button or we'll
reboot in 15 seconds". That one had not, and so I failed to suspect a panic
and needed to film it.

Film at http://opsec.eu/backup/20140621042.mp4

Is PANIC_REBOOT_WAIT_TIME not set to 15 seconds in general ?
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2014-08-28 11:01:35 UTC
http://svnweb.freebsd.org/base?view=revision&revision=260431

provides a new sysctl / loader tunable kern.panic_reboot_wait_time

which covers this use-case.
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:59:44 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2018-11-26 08:36:26 UTC
Assign to committer that resolved (in base r258893 base r258956 and MFC'd (stable/10) in base r260431