Bug 1534 - SIGSEGV in make_pdb_context_list ()
SIGSEGV in make_pdb_context_list ()
Status: CLOSED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts
3.0.4
All Linux
: P3 critical
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-15 05:07 UTC by Marcin Mikołajczak
Modified: 2005-08-24 10:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mikołajczak 2004-07-15 05:07:08 UTC
Every Samba component that uses a passdb backend seems to cause a SIGSEGV at 
first attemp to access the passdb (no matter what backend is actually used). 
User management utilities such as pdbedit and smbpasswd give this stack trace 
immediately after being run:

(gdb) run
Starting program: /usr/local/bin/pdbedit -L

Program received signal SIGSEGV, Segmentation fault.
0x0806afb1 in make_pdb_context_list ()
(gdb) bt
#0  0x0806afb1 in make_pdb_context_list ()
#1  0x0806b1ce in pdb_get_static_context ()
#2  0x0806b79f in initialize_password_db ()
#3  0x0805bb88 in main ()
#4  0x40085bb4 in __libc_start_main () from /lib/libc.so.6
(gdb)

Smbd starts normal, but when first client connects (tried with smbclient -L 
localhost), it gives out this:

waiting for a connection
Trying to load: smbpasswd
Attempting to register passdb backend guest
Successfully added passdb backend 'guest'
Attempting to find an passdb backend to match smbpasswd (smbpasswd)
No builtin backend found, trying to load plugin
Probing module 'smbpasswd'
Probing module 'smbpasswd': Trying to load from 
/usr/local/lib/samba3/pdb/smbpasswd.so
Attempting to register passdb backend smbpasswd
Successfully added passdb backend 'smbpasswd'
Module '/usr/local/lib/samba3/pdb/smbpasswd.so' loaded
Found pdb backend smbpasswd
pdb backend smbpasswd has a valid init
===============================================================
INTERNAL ERROR: Signal 11 in pid 30638 (3.0.4)
Please read the appendix Bugs of the Samba HOWTO collection
===============================================================
PANIC: internal error
BACKTRACE: 10 stack frames:
 #0 smbd(smb_panic2+0x18c) [0x8182e58]
 #1 smbd(smb_panic+0x10) [0x8182cca]
 #2 smbd [0x8173382]
 #3 smbd [0x81733d7]
 #4 /lib/libc.so.6 [0x40099b48]
 #5 smbd [0x8169996]
 #6 smbd(initialize_password_db+0xe) [0x8169f67]
 #7 smbd(main+0x514) [0x81d0f09]
 #8 /lib/libc.so.6(__libc_start_main+0xa4) [0x40085bb4]
 #9 smbd(yp_get_default_domain+0x81) [0x8074cc1]

(Last minute: a stack trace in gdb shows exactly the same as for pdbedit and co.
) Using a compiled in backend module doesn't change anything. Same thing happens 
with pdb_sampasswd, pdb_tdbdam, pdb_mysql (don't have other modules compiled). 
There are no messages in any log file that could suggest the cause of this 
crash. No ohter programs behave weirdly on this machine.

System: Linux Slackware 9.1

Libraries: ldd -v `whereis smbd`
/usr/local/sbin/smbd:
    libnsl.so.1 (GLIBC_2.0) => /lib/libnsl.so.1
    libcrypt.so.1 (GLIBC_2.0) => /lib/libcrypt.so.1
    libdl.so.2 (GLIBC_2.1) => /lib/libdl.so.2
    libdl.so.2 (GLIBC_2.0) => /lib/libdl.so.2
    libc.so.6 (GLIBC_2.1.1) => /lib/libc.so.6
    libc.so.6 (GLIBC_2.2.3) => /lib/libc.so.6
    libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
    libc.so.6 (GLIBC_2.2) => /lib/libc.so.6
    libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
    libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
    libc.so.6 (GLIBC_2.0) => /lib/libc.so.6

Compilaton: ./configure \
    --prefix=/usr/local \
    --libdir=/usr/local/lib/samba3 \
    --includedir=/usr/local/include/samba3 \
    --with-privatedir=/usr/local/var/samba3 \
    --with-lockdir=/usr/local/var/samba3 \
    --with-piddir=/usr/local/var \
    --with-localstatedir=/usr/local/var \
    --with-swatdir=/usr/local/share/swat3 \
    --with-configdir=/usr/local/etc \
    --with-logfilebase=/usr/local/var/samba3 \
    --disable-cups \
    --with-smbwrapper \
    --with-smbmount \
    --with-syslog \
    --with-quotas \
    --with-sys-quotas \
    --with-utmp \
    --with-manpages-langs=en \
    --with-acl-support \
    --with-libsmbclient \
    --enable-shared=yes \
    --with-expsam=mysql \
    --with-shared-modules=pdb_smbpasswd,pdb_tdbsam
Comment 1 Marcin Mikołajczak 2004-07-15 05:11:02 UTC
Forgot about my smb.conf :-)

[global]
workgroup = WORKGROUP
netbios name = SAMBA
[homes]
guest ok = no
read only = no
Comment 2 Gerald (Jerry) Carter 2005-02-05 07:57:46 UTC
please retest against 3.0.11 and reopen if necessary.  Also reset 
the version if you reopen the bug report.  Thanks.
Comment 3 Gerald (Jerry) Carter 2005-08-24 10:17:16 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.