[Pkg-samba-maint] Bug#439882: Bug#439882: samba: Panic or segfault in Samba, and (unable to) core dump

Paolo oopla at users.sf.net
Fri Aug 31 07:28:41 UTC 2007


On Tue, Aug 28, 2007 at 06:30:12PM -0700, Steve Langasek wrote:
> 
> > # ls -l /var/run/samba/locking.tdb
> > -rw-r--r-- 1 root root 40200 2007-08-28 21:05 /var/run/samba/locking.tdb
> 
> > so it seems that's root stuff and shouldn't have failed to write/expand it.
> 
> Right, so the file is going to be opened as root, but the locks are going to
> be written after the process has changed uids to handle a client request; so
> I think the write will fail because of that.

hm, dosn't sound right - how is it supposed to write as non-root into 
root-owned 0644 file? the failure is in expand_file() where it tries to make
extra room in locking.tdb; it semmes to me that is (should be) done as root.

> > Anyway, samba shows poor/bad behaviour here (ie buggy), it went into a tight
> > loop, restarting smbd and firing off ~1000 panic msgs in a few mins and 
> > filling up logs.
> 
> No, samba is doing exactly what it's asked to by the client.  smbd doesn't
> restart itself, if you're getting multiple copies spawned it's because it's
> being restarted by repeated client requests.

ok - maybe: if it detects an error such that it won't be able to serve the
client, well, it should refrain to try over and over. Or perhaps should 
signal the client properly to give up. Hm, perhaps it does so already, hence
smbmount (3.0.20b-1woody1) is guilty?

> 
> > [2007/08/28 09:53:48, 0] lib/fault.c:dump_core(168)
> >   unable to change to /var/log/samba/cores/smbdrefusing to dump core
> > [2007/08/28 09:53:48, 0] smbd/server.c:main(847)
> 
> > there's no such /var/log/samba/cores/smbdrefusing and no core dump; /var/log
> > is on another partition with plenty of space.
> 
> Well, presumably you could create these directories by hand and capture a
> core dump that way, but if you're running out of disk space that doesn't
> sound like it would be too helpful in this case.
> 
> On my system, these directories exist and appear to have been autocreated by
> the daemons on start.

I do see such dirs here:

# ls -l /var/log/samba/cores/            
drwx------ 2 root root 1024 2006-07-18 00:44 nmbd
drwx------ 2 root root 1024 2007-08-28 10:17 smbd

I 1st got confused by the missing ' ' in the msg, looking for dir
'/var/log/samba/cores/smbdrefusing' :} - well I guess smbd would dump core
as root, so I don't see any obvious reason why it didn't.

This Etch system is an upgrade from Sarge ... is it possible I myself or the
install script have missed some trick in the process?


thanks
--
paolo




More information about the Pkg-samba-maint mailing list