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

Scott Gifford sgifford at suspectclass.com
Wed Mar 13 03:07:03 GMT 2002


David Lee <t.d.lee at durham.ac.uk> writes:

> On 13 Mar 2002, Scott Gifford wrote:
> 
> > [...]
> > 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.
> > 
> > > Dumping core just has 'bad idea' written all over it.
> > 
> > It seem to me that investing a lot of time into designing something
> > that gives the equivalent functionality of core files has 'reinventing
> > the wheel' written all over it...
> 
> Scott, I certainly sympathise with your "not reinventing the wheel" ideal. 
> And I'm tempted to agree that having a core file might be preferable to
> having a simple backtrace.  (Note that you draw me further into an
> implicit "either/or", which I will later address.) 

For the archive, you're quoting's a little off above; some of the
above is Andrew's and some is mine.

[...]

> But we're in danger of seeing this as an either/or, when it is more a
> both/and. 

I would love to be able to say something like:

   panic action = coredump
   panic directory = /var/log/samba/crash
   panic user = nobody

to make it a both/and.  I've been trying to find a regular command
that could evoke a coredump in a more controlled way (perhaps a
command-line option to gdb that I couldn't find?), but I haven't been
able to come up with one.

Not that it matters all that much; I haven't had Samba crash on me in
several years.  :-)

----ScottG.




More information about the samba-technical mailing list