Subject: kern/8554: smbd hangs in semop when servicing requests
To: None <gnats-bugs@gnats.netbsd.org>
From: Ted Lemon <mellon@fugue.com>
List: netbsd-bugs
Date: 10/04/1999 13:26:08
>Number: 8554
>Category: kern
>Synopsis: smbd hangs in semop when servicing requests
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 4 13:20:01 1999
>Last-Modified:
>Originator: Ted Lemon
>Organization:
Internet Software Consortium
>Release: September 24, 1999
>Environment:
Intel Pentium II
NetBSD 1.4K
ELF libraries from ``make build'' of -current
System: NetBSD tundruk 1.4K NetBSD 1.4K (TUNDRUK) #0: Fri Sep 24 18:47:11 EDT 1999 mellon@tundruk:/var/src/src/sys/arch/i386/compile/TUNDRUK i386
>Description:
When I start samba with a configuration that was working prior to
the SysV IPC updates on August 24, it fails to serve SMB clients.
The symptom from the SMB client side is a timeout. From the server
side, it logs the message "Trying sysv shmem open of size 1048576"
and then hangs (this is with debug level = 127). When I run ktrace
on it, it is hanging in the semop system call:
25802 smbd GIO fd 3 wrote 41 bytes
" Trying sysv shmem open of size 1048576
"
25802 smbd RET write 41/0x29
25802 smbd CALL semget(0x280269,0,0)
25802 smbd RET semget 65536/0x10000
25802 smbd CALL __semctl13(0x10000,0,0x2,0xefbfd4d4)
25802 smbd RET __semctl13 0
25802 smbd CALL __semctl13(0x10000,0,0x5,0xefbfd4d4)
25802 smbd RET __semctl13 0
25802 smbd CALL __semctl13(0x10000,0,0x4,0xefbfd4d4)
25802 smbd RET __semctl13 0
25802 smbd CALL kill(0,0)
25802 smbd RET kill 0
25802 smbd CALL __semctl13(0x10000,0,0x1,0xefbfd4d4)
25802 smbd RET __semctl13 0
25802 smbd CALL semop(0x10000,0xefbfd49c,0x1)
I have been able to work around this by hacking samba to use
MMAP for locking instead of SYSV IPC. I don't know if this is
actually the result of the changes to SYSV IPC that were made on
the 24th of August, but it's the only smoking gun I can see.
>How-To-Repeat:
Install the Samba package. Set up a /etc/smb.conf, start smbd
and nmbd, and then try to mount a share from an NT box. Here is
a sample smb.conf file, in case you don't have one:
[global]
browsable = True
dns proxy = yes
encrypt passwords = yes
log file = /var/log/samba.log
mangled names = no
null passwords = no
time server = yes
workgroup = home
remote announce = 10.0.0.255/none
remote announce = 10.0.0.255/tundruk
debug level = 127
[jschmoe]
user = jschmoe
path = /udir/jschmoe
writeable = yes
You also need a /etc/samba/lmhosts file:
10.0.0.2 grosse
10.0.0.1 tundruk
10.0.0.8 dulwa
And a /etc/samba/smbpasswd file, which you can create with the smbpasswd
command.
>Fix:
Unknown.
>Audit-Trail:
>Unformatted: