On Nov 22, 2019 3:30 PM, Johan Prins <[email protected]> wrote:
>
> Hi
>
> Occasionally, (once a month in 25 openbsd systems,) I get a kernel panic.
> (I know I should try to debug the problem, but the systems are too hard
> to access and I do not have the time)
>
> But it would be great if those systems would reboot on panic and
> therefore I entered ddb.panic=0 in /etc/sysctl.conf.
> Now in case of a panic, my systems indeed try to reboot, but they stop
> showing the line:
> syncing disks...
> The strange thing is that just hitting [enter] syncing disks continue
> and the server reboots.
> I think that that is a simple bug, for it should not be neccessary to
> hit enter.
>
> To my regret I cannot reproduce the situation. I have also searched
> everywhere to find a way to trigger a panic, to see if I could reproduce
> it, but I failed in that as well.
>
> I see that dbb can boot with different options. I have the impression
> that the server after a panic is rebooted with ´boot sync´. It would be
> convenient if somehow it would be possible to configure the system to
> boot with the option ´boot reboot´ to circumvent the syncing disks
> problem. (It would be less ideal but acceptable.)
> The more so since I read in the 6.5 Changelog:
> Modified the ddb(4) reboot command to skip anything which might cause an
> additional panic. :)
>
> with kind regards
> Johan
>
This should do it.
/* Public domain */
#include <sys/systm.h>
#include <sys/types.h>
int
main(void)
{
panic("scheduled panic");
return (0);
}