Autodumping on panic

John Baldwin jhb at freebsd.org
Tue Mar 6 17:04:13 UTC 2007


On Sunday 04 March 2007 15:38, Jeremie Le Hen wrote:
> Hi, Eric,
> 
> On Sun, Mar 04, 2007 at 02:21:54PM -0600, Eric Anderson wrote:
> > On 03/02/07 15:04, Jeremie Le Hen wrote:
> > >I've just changed my window manager, and I'm experiencing a few issues
> > >with it.  This may be a panic but I can't be sure for now.  Indeed I
> > >don't have a serial port on my laptop.
> > >
> > >I'm sure it is possible to ask the kernel to call doadump()
> > >automatically on panic, but I can't remember how.  Please, could you
> > >give me the correct way to do it ?
> > 
> > 
> > Any word on this?  I'd love to set this up too.  Would be nice to 
> > auto-dump+reset on servers..
> 
> Robert Watson replied me privately.  Hereafter you will find my reply:
> 
> On Sat, Mar 03, 2007 at 03:12:53PM +0100, Jeremie Le Hen wrote:
> > On Sat, Mar 03, 2007 at 12:35:43PM +0000, Robert Watson wrote:
> > > You may be able to set the "unattended" sysctl or kernel compile option 
to 
> > > cause it to panic and reboot rather than dropping into DDB.  However, 
I'm 
> > > not in front of a box I can test that on right now, so I'm replying 
> > > privately in case I'm completely wrong :-).
> > 
> > Thank you for your reply.  I've checked the code in kern_shutdown.c and
> > indeed KDB_UNATTENDED sets the default value of debug.debugger_on_panic
> > to 0.  In case we didn't drop to the debugger, doadump() is called,
> > this is what I want.  Actually turning off the sysctl manually should
> > also do it.
> 
> I hope this wille help.

Yes, KDB_UNATTENDED will work, but there is a bug in that the system should 
not enter DDB when you are in X, it should just drop a dump and then reboot.  
This used to work but is broken in 5.x and later I believe.  IWBN to get this 
fixed again.

-- 
John Baldwin


More information about the freebsd-current mailing list