Wednesday, November 15, 2006

Debian SMB crash caused by comma

There's other info about this problem online, but I had a bit of a hard time navigating it, so I presume others will as well. I'm using debian, but this seems to be a samba problem, not a debian problem.

Anyway, a recent upgrade to samba causes a samba "panic". Samba simply quits almost silently on startup. I got no messages in the system logs or console, or even at the command line when I ran smbd by hand, but I did get a mail message with this:


The Samba 'panic action' script, /usr/share/samba/panic-action,
was called for PID 5475 (/usr/sbin/smbd).

This means there was a problem with the program, such as a segfault.
Below is a backtrace for this process generated with gdb, which shows
the state of the program at the time the error occurred. The Samba log
files may contain additional information about the problem.

If the problem persists, you are encouraged to first install the
samba-dbg package, which contains the debugging symbols for the Samba
binaries. Then submit the provided information as a bug report to
Debian. For information about the procedure for submitting bug reports,
please see http://www.debian.org/Bugs/Reporting or the reportbug(1)
manual page.

(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1481845056 (LWP 5475)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xa7bda80e in waitpid () from /lib/tls/libc.so.6
#0 0xa7bda80e in waitpid () from /lib/tls/libc.so.6
#1 0xa7b82699 in strtold_l () from /lib/tls/libc.so.6
#2 0xa7d1256d in system () from /lib/tls/libpthread.so.0
#3 0x0822b9da in smb_panic ()
#4 0x081eaa61 in make_pdb_method_name ()
#5 0x081eaaae in initialize_password_db ()
#6 0x082c1eb1 in main ()


I also got this message in my samba logs:


[2006/11/15 11:17:06, 0] lib/util.c:log_stack_trace(1699)
BACKTRACE: 7 stack frames:
#0 /usr/sbin/smbd(log_stack_trace+0x23) [0x822b883]
#1 /usr/sbin/smbd(smb_panic+0x46) [0x822b976]
#2 /usr/sbin/smbd [0x81eaa61]
#3 /usr/sbin/smbd(initialize_password_db+0xe) [0x81eaaae]
#4 /usr/sbin/smbd(main+0x591) [0x82c1eb1]
#5 /lib/tls/libc.so.6(__libc_start_main+0xc8) [0xa7c1dea8]
#6 /usr/sbin/smbd [0x8082a31]
[2006/11/15 11:17:06, 0] lib/util.c:smb_panic(1600)
smb_panic(): calling panic action [/usr/share/samba/panic-action 5454]
[2006/11/15 11:17:06, 0] lib/util.c:smb_panic(1608)
smb_panic(): action returned status 0
[2006/11/15 11:17:06, 0] lib/fault.c:dump_core(173)
dumping core in /var/log/samba/cores/smbd
[2006/11/15 11:17:33, 0] smbd/server.c:main(847)
smbd version 3.0.23c started.
Copyright Andrew Tridgell and the Samba Team 1992-2006
[2006/11/15 11:17:33, 0] smbd/server.c:main(881)
standard input is not a socket, assuming -D option
[2006/11/15 11:17:33, 0] passdb/pdb_interface.c:make_pdb_method_name(174)
No builtin nor plugin backend for tdbsam, found
[2006/11/15 11:17:33, 0] lib/util.c:smb_panic(1592)
PANIC (pid 5475): pdb_get_methods_reload: failed to get pdb methods for backend tdbsam,


Yikes! looks like a seg-fault or something, right? Well, not quite. According to the developers it's more like an assert failure, caused by the fact that the passdb no longer supports multiple backends (whatever that means).

As far as the user is concerned, the problem is in the config file. (My config file was previously created by SWAT, so you'd think it would be okay....). Why a cofig file problem looks for all the world like a seg fault or bus error is unknown to me, but the problem, it turns out, was an extra comma in the config file:


passdb backend = tdbsam,


should read:


passdb backend = tdbsam


Some other sites suggested removing "guest" from the backend list, which, of course I didn't have. The problem was simply a comma that's no longer supported. Seems strange that smbd would crash because of a config file created by a previous version of SWAT, but that's the deal.

Friday, November 10, 2006

Synth Geeks

As a child, I could never decide between my dream of being a rock star and being a space-ship captain. I think these folks were probably in the same boat growing up.