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

Andrew Bartlett abartlet at pcug.org.au
Wed Mar 13 02:03:51 GMT 2002


Scott Gifford wrote:
> 
> Andrew Bartlett <abartlet at pcug.org.au> writes:
> 
> > Scott Gifford wrote:
> > >
> > > Andrew Bartlett <abartlet at pcug.org.au> writes:
> > >
> > > > David Lee wrote:
> > >
> > > [...]
> > >
> > > > > 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?
> > > >
> > > > Quite promising, and it would *really* help with our debugging.
> > >
> > > Perhaps I'm missing something obvious, but why not just let Samba dump
> > > core?...It's straightforward to provide a backtrace from a core file.
> >
> > Where?  Under what uid?  Following what symlinks?
> 
> All of this is handled by the OS, and core is dumped in the current
> working directory.  I don't know how Samba decides what directories to
> chdir() into, but if it wanders around a bit, something like
> chdir("/some/known/directory"); abort(); in a signal handler will make
> sure that the corefile ends up in a sane place.

But as what user?  And it must work perfectly across 30 different
operating systems.  A sig11 that has us compleatly hosed must not be
able to affect where/how we dump core. 

In any case, the user who understands what a 'core' does is not the
target audience.  The target audience is the user who gets a Panic and
doesn't know much more than how to send us a logfile.  

If we can somehow safely redirect a backtrace into the standard samba
logfile then that would be great!

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net




More information about the samba-technical mailing list