Automatic backtrace [Was: Re: NetAPP/Samba 3.0/plugs]

David Lee t.d.lee at durham.ac.uk
Tue Mar 12 07:00:11 GMT 2002


On Tue, 12 Mar 2002, Andrew Bartlett wrote:

> Danny Braniss wrote:
> > [...]
> > [2002/03/12 11:43:14, 0] /vol/src/Samba/samba/source/lib/fault.c:fault_report(3
> > 6)
> >   ===============================================================
> > [2002/03/12 11:43:14, 0] /vol/src/Samba/samba/source/lib/fault.c:fault_report(3
> > 7)
> >   INTERNAL ERROR: Signal 11 in pid 1868 (3.0-alpha16)
> >   Please read the file BUGS.txt in the distribution
> > [2002/03/12 11:43:14, 0] /vol/src/Samba/samba/source/lib/fault.c:fault_report(3
> > 9)
> >   ===============================================================
> > [2002/03/12 11:43:14, 0] /vol/src/Samba/samba/source/lib/util.c:smb_panic(1124)
> >   PANIC: internal error
> 
> You didn't mention that bit...  Can you recompile with --enable-debug
> and get me a gdb backtrace ('panic action = /bin/sleep 9000' should help
> in attaching the debugger).

(Note tangential subject change...)

This process of obtaining something useful from such internal errors seems
currently to be in the realm of little-known folklore.  And even when it
is known, other factors (e.g. time, user-pressure, out-of-hours) can
conspire against it. 

I wonder whether it might be worth trying to make it (a) easier, (b) more
automatic, (c) able to help those sporadic, not-instantly-reproducible
cases?  Something like: 

1. "configure[.in]" tries to locate "gdb" (or, as a generalised
   refinement, other possible, known debugging programs);

2. "--enable-debug" could be the default for self-build systems (possible
   issue here if this introduces a significant  performance overhead?);

3. If "gdb" (or similar) is found and "--enable-debug" is set, then the
   default panic action could be to invoke gdb (or other debugger) with
   the relevant subcommands to perform and log the backtrace.

Sure, that probably needs refinement.  But for the moment read it for the
positive possibilities not the worrying nitpicks. 

Promising?  Or an unrealistic non-starter?

-- 

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :





More information about the samba-technical mailing list