Kernel Panics

Started by tuaris, June 27, 2017, 11:20:07 PM

Previous topic - Next topic
The main inconvenience here is how long the device takes to actually shutdown the OS and start the reboot.   It takes about 5 minutes to do the dump for the stack trace.  Anyway we can disable that and speed up the process a bit?  I'm willing to live with this if the recovery period can be speed-up.

Add this as a file under /usr/local/etc/rc.syshook.d/00-reset.early

#!/bin/sh
cp /etc/ddb.conf /etc/ddb.conf.bak
(grep -v kdb.enter.panic /etc/ddb.conf.bak; echo "script kdb.enter.default=reset") > /etc/ddb.conf
rm -f /etc/ddb.conf.bak
ddb /etc/ddb.conf


# chmod 700 /usr/local/etc/rc.syshook.d/00-reset.early
# /usr/local/etc/rc.syshook.d/00-reset.early

It should automatically apply after reboot.

You can emulate a crash with the following command to confirm:

# sysctl debug.kdb.panic=1


Cheers,
Franco