NMBD crashing in 2.2.7a (and 2.2.6, 2.2.5)

Edgar, Bob Bob.Edgar at commerzbankib.com
Fri Mar 28 13:34:33 GMT 2003


Sorry, I forgot to include smb.conf. I am building the 2.2.8 release now
and will install it in the next couple of hours (assuming all builds
cleanly)
so any testing can be done against that release.

The current (2.2.7a) release we built with the following:
CC=/opt/SUNWspro/bin/cc ../../configure \
    --with-automount \
    --with-msdfs \
    --with-nisplus-home \
    --with-readline \
    --with-pam \
    --with-syslog \
    --with-utmp \
    --with-tdbsam \
    --with-libsmbclient \
    --with-configdir=/etc/samba \
    --with-privatedir=/etc/samba/private \
    --with-codepagedir='${prefix}/codepages' \
    --with-lockdir=/var/samba/locks \
    --localstatedir=/var/samba \
    --mandir=/usr/local/share/man



#
# Global parameters
#
[global]
    comment = %h.fra.ib.commerzbank.com
    server string = Spicenet administrative server
    max log size = 51200
    debug timestamp = Yes
    debug uid = Yes
    debuglevel = 1
    panic action = /bin/sleep 90000
    # When nmbd dies you will find a sleep process left on the machine.
    # Using ps, find the parent of this process (it will be an nmbd
process),
    # then attach to it using gdb.
    # Type 'bt' to get a backtrace of the problem and mail it to the list
    # samba-technical at lists.samba.org


    workgroup = FRAIB
    security = DOMAIN
    encrypt passwords = Yes
    #
    # password server= * works but broke when the network melted down.
    #
    password server = pdcfraib dfsfraib sms1fraib
    name resolve order = host, wins
 
    load printers = No
    printcap name = /etc/printcap
    character set = ISO8859-1
    wins proxy = Yes
    wins server = pdcfraib.fra.ib.commerzbank.com
    valid chars = 159 176 177 178 179 180 185 186 187 188 191 192 193 194 \
        195 196 197 200 201 202 203 204 205 206 217 218 219 220 223 242 254
    remote announce = pdclonib
    NIS homedir = Yes
    
    print command = /usr/bin/lp -c -s -d %p -o nobanner %s; rm %s
    lpq command = /usr/bin/lpstat -o %p
    lprm command = /usr/bin/cancel %p-%j
    lppause command = /usr/bin/lp -H hold %p-%j
    lpresume command = /usr/bin/lp -H resume %p-%j
    oplocks = No
    kernel oplocks = No
    level2 oplocks = No
    case sensitive = No
    preserve case = Yes
    username map = /etc/samba/username.map

[homes]
    admin users = edgarb
    comment = Home Directory
    path = %H
    writeable = Yes
    create mask = 0755
    browseable = No

[Clearcase]
    comment = Clearcase software
    path = /export/share/clearcase/v4.1
    force user = root
    force group = root
    writeable = Yes
    create mask = 0755
    directory mask = 0755

[Clearcase42]
    comment = Clearcase software
    path = /export/share/clearcase/v4.2
    force user = root
    force group = root
    writeable = Yes
    create mask = 0755
    directory mask = 0755

[CCData]
    comment = Clearcase Data Store
    path = /export/var/clearcase
    write list = @ccaccess
    create mask = 0775
    directory mask = 0775
    read only = yes

-----Original Message-----
From: Edgar, Bob [mailto:Bob.Edgar at commerzbankib.com]
Sent: Freitag, 28. März 2003 14:20
To: 'samba-technical at lists.samba.org'
Subject: NMBD crashing in 2.2.7a (and 2.2.6, 2.2.5)


Hi all,

I've been having a problem with nmbd crashing multiple times per day.
I suspect that the problem is caused by a shell script that tries to
lookup the name for ws0000 to ws4000 to build a DNS reverse table.

It look something like this:

#!/bin/ksh
typeset -Z4 i=0
while (( $i < 4000 )); do
    host=ws$i
    nmblookup $host | awk -v host=$host '
		/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/ {
			printf("%s  IN  A   %s\n", host, $1)
		}
	'
    (( i = i + 1 ))
done

I have a level 10 debug log which I could send if it would be useful.

Let me know if there is any more information I can provide.

Bob



root at salt-[14:16]-> uname -a
SunOS salt 5.7 Generic_106541-19 sun4u sparc SUNW,Ultra-60

root at salt-[14:02]-> gdb /usr/local/samba/bin/nmbd   5051
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.7"...(no debugging symbols
found)...
/usr/proc/bin/5051: No such file or directory.
Attaching to program `/usr/local/samba/bin/nmbd', process 5051
Reading symbols from /usr/lib/libsec.so.1...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libsec.so.1
Reading symbols from /usr/lib/libgen.so.1...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libgen.so.1
Reading symbols from /usr/lib/libsocket.so.1...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libnsl.so.1...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libdl.so.1...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/dt/lib/libpam.so.1...(no debugging symbols
found)...done.
Loaded symbols for /usr/dt/lib/libpam.so.1
Reading symbols from /usr/lib/libc.so.1...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libmp.so.2...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1...(no
debugging symbols found)...done.
Loaded symbols for /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
Retry #1:
Retry #2:
Retry #3:
Retry #4:
[New LWP 1]
Symbols already loaded for /usr/lib/libsec.so.1
Symbols already loaded for /usr/lib/libgen.so.1
Symbols already loaded for /usr/lib/libsocket.so.1
Symbols already loaded for /usr/lib/libnsl.so.1
Symbols already loaded for /usr/lib/libdl.so.1
Symbols already loaded for /usr/dt/lib/libpam.so.1
Symbols already loaded for /usr/lib/libc.so.1
Symbols already loaded for /usr/lib/libmp.so.2
Symbols already loaded for /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
0xff21a374 in _waitid () from /usr/lib/libc.so.1
(gdb) bt
#0  0xff21a374 in _waitid () from /usr/lib/libc.so.1
#1  0xff1d8374 in _waitpid () from /usr/lib/libc.so.1
#2  0xff20ffd0 in system () from /usr/lib/libc.so.1
#3  0x7d1d0 in smb_panic ()
#4  0x641ac in fault_report ()
#5  <signal handler called>
#6  0xff1506bc in memcpy () from
/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
#7  0x2bc10 in query_name_response ()
#8  0x30ac0 in process_nmb_response ()
#9  0x30b44 in run_packet_queue ()
#10 0x21b0c in process ()
#11 0x22c10 in main ()
(gdb) 


root at salt-[13:55]-> ./pstack  5051  
5051:   /usr/local/sbin/nmbd -d 10 -D
 ff21a374 waitid   (0, 268, ffbeebc8, 103)
 ff1d836c _waitpid (268, ffbeecb0, 100, 0, c, 0) + 54
 ff20ffc8 system   (112690, da000, 70d98, 7, d3db0, d3dc4) + 230
 0007d1c8 smb_panic (d3e0c, d3db0, d3dc4, 29, 0, ee800) + 28
 000641a4 fault_report (b, 0, ffbeefa8, 0, 0, 0) + 164
 ff219650 sigacthandler (b, 0, ffbeefa8, 68, 0, ffbef2dc) + 28
 --- called from signal handler with signal 11 (SIGSEGV) ---
 ff1506bc memcpy   (1122f0, 33f8d8, 33d618, 89, 0, ee800) + 1c
 00030ab8 process_nmb_response (33d618, 33d618, 9fc00, 0, ffbef320,
ffbef328) + d0
 00030b3c run_packet_queue (0, 0, 0, 7, ff235e10, 69e24) + 74
 00021b04 process  (1, f, bb8dc, 370, 9fc00, ee800) + 54
 00022c08 main     (4, d8c00, 9fc00, a6800, 0, 0) + 8e8
 00020920 _start   (0, 0, 0, 0, 0, 0) + 108



root at salt-[13:56]-> ./pmap  5051  
5051:   /usr/local/sbin/nmbd -d 10 -D
00010000    512K read/exec         /usr/local/samba/bin/nmbd
0009E000    240K read/write/exec   /usr/local/samba/bin/nmbd
000DA000   2528K read/write/exec     [ heap ]
FF140000      8K read/write/shared dev:85,2 ino:115369
FF150000     16K read/exec         /usr/platform/sun4u/lib/libc_psr.so.1
FF160000     16K read/exec         /usr/lib/libmp.so.2
FF172000      8K read/write/exec   /usr/lib/libmp.so.2
FF180000    664K read/exec         /usr/lib/libc.so.1
FF234000     40K read/write/exec   /usr/lib/libc.so.1
FF250000     24K read/exec         /usr/lib/libpam.so.1
FF264000     16K read/write/exec   /usr/lib/libpam.so.1
FF270000      8K read/write/shared dev:85,2 ino:115263
FF280000    520K read/exec         /usr/lib/libnsl.so.1
FF310000     40K read/write/exec   /usr/lib/libnsl.so.1
FF31A000     32K read/write/exec     [ anon ]
FF330000      8K read/write/exec     [ anon ]
FF340000     32K read/exec         /usr/lib/libsocket.so.1
FF356000     16K read/write/exec   /usr/lib/libsocket.so.1
FF360000     24K read/exec         /usr/lib/libgen.so.1
FF374000     16K read/write/exec   /usr/lib/libgen.so.1
FF380000     16K read/exec         /usr/lib/libsec.so.1
FF392000      8K read/write/exec   /usr/lib/libsec.so.1
FF3A0000      8K read/exec         /usr/lib/libdl.so.1
FF3B0000    136K read/exec         /usr/lib/ld.so.1
FF3E0000     16K read/write/exec   /usr/lib/ld.so.1
FFBEA000     24K read/write          [ stack ]
 total     4976K

root at salt-[13:57]-> ./pcred  5051
5051:   e/r/suid=0  e/r/sgid=0
        groups: 0 2 3 4 5 6 7 8 9 12 26

root at salt-[14:01]-> ./pfiles   5051
5051:   /usr/local/sbin/nmbd -d 10 -D
  Current rlimit: 1024 file descriptors
   0: S_IFCHR mode:0666 dev:85,1 ino:173935 uid:0 gid:3 rdev:13,2
      O_RDWR|O_LARGEFILE
   1: S_IFCHR mode:0666 dev:85,1 ino:173935 uid:0 gid:3 rdev:13,2
      O_RDWR|O_LARGEFILE
   2: S_IFCHR mode:0666 dev:85,1 ino:173935 uid:0 gid:3 rdev:13,2
      O_RDWR|O_LARGEFILE
   4: S_IFREG mode:0644 dev:85,2 ino:115282 uid:0 gid:0 size:20
      O_WRONLY|O_NONBLOCK|O_LARGEFILE
   5: S_IFREG mode:0600 dev:85,2 ino:115263 uid:0 gid:0 size:696
      O_RDWR|O_LARGEFILE
      advisory read lock set by process 1882
   6: S_IFSOCK mode:0666 dev:179,0 ino:14602 uid:0 gid:0 size:0
      O_RDWR
   7: S_IFSOCK mode:0666 dev:179,0 ino:41267 uid:0 gid:0 size:0
      O_RDWR
   8: S_IFSOCK mode:0666 dev:179,0 ino:49162 uid:0 gid:0 size:0
      O_RDWR
   9: S_IFSOCK mode:0666 dev:179,0 ino:29431 uid:0 gid:0 size:0
      O_RDWR
  10: S_IFDOOR mode:0444 dev:184,0 ino:29870 uid:0 gid:0 size:0
      O_RDONLY|O_LARGEFILE FD_CLOEXEC  door to nscd[8509]
  11: S_IFIFO mode:0000 dev:180,0 ino:457166 uid:0 gid:0 size:0
      O_RDWR|O_NONBLOCK
  12: S_IFIFO mode:0000 dev:180,0 ino:457166 uid:0 gid:0 size:0
      O_RDWR|O_NONBLOCK
  13: S_IFREG mode:0644 dev:85,2 ino:115369 uid:0 gid:0 size:8192
      O_RDWR|O_LARGEFILE
  14: S_IFCHR mode:0666 dev:85,1 ino:173931 uid:0 gid:3 rdev:21,0
      O_WRONLY FD_CLOEXEC
  15: S_IFREG mode:0644 dev:85,2 ino:96066 uid:0 gid:0 size:51771934
      O_WRONLY|O_APPEND|O_LARGEFILE
root at salt-[14:01]-> 

root at salt-[14:01]-> lsof -p 5051
COMMAND  PID USER   FD   TYPE        DEVICE SIZE/OFF   NODE NAME
nmbd    5051 root  cwd   VDIR          85,1      512 167432 /etc/rc3.d
nmbd    5051 root  txt   VREG          85,1  1398892 224134
/usr/local/samba/bin/nmbd
nmbd    5051 root  txt-r VREG          85,2     8192 115369
/var/samba/locks/unexpected.tdb
nmbd    5051 root  txt   VREG          85,1    17256 224444
/usr/platform/sun4u/lib/libc_psr.so.1
nmbd    5051 root  txt   VREG          85,1    19876 409774
/usr/lib/libmp.so.2
nmbd    5051 root  txt   VREG          85,1  1125848 409809
/usr/lib/libc.so.1
nmbd    5051 root  txt   VREG          85,1    33400 409778
/usr/lib/libpam.so.1
nmbd    5051 root  txt-r VREG          85,2      696 115263
/var/samba/locks/messages.tdb
nmbd    5051 root  txt   VREG          85,1   836324 411455
/usr/lib/libnsl.so.1
nmbd    5051 root  txt   VREG          85,1    57788 409941
/usr/lib/libsocket.so.1
nmbd    5051 root  txt   VREG          85,1    41500 409762
/usr/lib/libgen.so.1
nmbd    5051 root  txt   VREG          85,1    14908 409792
/usr/lib/libsec.so.1
nmbd    5051 root  txt   VREG          85,1     4656 411452
/usr/lib/libdl.so.1
nmbd    5051 root  txt   VREG          85,1   193528 409795 /usr/lib/ld.so.1
nmbd    5051 root    0u  VCHR          13,2      0t0 173935
/devices/pseudo/mm at 0:null
nmbd    5051 root    1u  VCHR          13,2      0t0 173935
/devices/pseudo/mm at 0:null
nmbd    5051 root    2u  VCHR          13,2      0t0 173935
/devices/pseudo/mm at 0:null
nmbd    5051 root    4ww VREG          85,2       20 115282 /var
(/dev/md/dsk/d2)
nmbd    5051 root    5ur VREG          85,2      696 115263
/var/samba/locks/messages.tdb
nmbd    5051 root    6u  inet 0x30007476c30      0t0    UDP *:netbios-ns
(Idle)
nmbd    5051 root    7u  inet 0x30008c99888      0t0    UDP *:netbios-dgm
(Idle)
nmbd    5051 root    8u  inet 0x30008ccbab0      0t0    UDP salt:netbios-ns
(Idle)
nmbd    5051 root    9u  inet 0x300064c4400      0t0    UDP salt:netbios-dgm
(Idle)
nmbd    5051 root   10r  DOOR         184,0      0t0  29870
/etc/.name_service_door (door to nscd[8509])
nmbd    5051 root   11u  FIFO 0x3000931f7e0      0t0 457166 /view
(mvfs=/view) PIPE->0x3000931f8c0
nmbd    5051 root   12u  FIFO 0x3000931f8c0      0t0 457166 /view
(mvfs=/view) PIPE->0x3000931f7e0
nmbd    5051 root   13ur VREG          85,2     8192 115369
/var/samba/locks/unexpected.tdb
nmbd    5051 root   14w  VCHR          21,0      0t0 173931
/devices/pseudo/log at 0:conslog->LOG
nmbd    5051 root   15w  VREG          85,2 51771934  96066
/var/samba/log.nmbd


The legal  word: 
    "This message only reflects the personal opinion of the author and 
      must not be regarded as or considered to be any form of reference 
      to the opinion of the Commerzbank AG or any of its affiliated 
      companies." 
On the other hand, it probably doesn't accurately reflect the author's 
opinion either, but that's another story. So it goes. 
Copyright (C) 2003 MrBob, no rights reserved. 


More information about the samba-technical mailing list