Date: Sat, 14 Feb 2009 22:54:05 +0100 From: Goran Lowkrantz <goran.lowkrantz@ismobile.com> To: freebsd-stable@freebsd.org Subject: Problems with samba and vista on 7.1-STABLE Message-ID: <6142197C185AA728E9D4345C@[10.255.253.2]>
next in thread | raw e-mail | index | archive | help
I have few Samba servers running FreeBSD 7.1 were we have a problem with=20 connection blocking from a few Vista systems that run programs that watch=20 directories and files on the samba shares. On my test setup I have managed to get a hang in about 30 min. Samba is built with minimum functions and full debug. Options don't seems=20 to have any impact on the problem. The PC uses Vista Business SP1 and all patches, I run a DAM program called=20 IMatch that watches for changes in the photo database. The FreeBSD server is an up-to-date quad AMD server with 8GB running=20 7.1-STABLE. In normal operation, I see the following: # sockstat | grep 445 glz smbd 7828 23 tcp4 10.255.253.1:445 = 10.255.253.2:57355 root smbd 76917 19 tcp4 127.0.0.1:445 *:* root smbd 76917 20 tcp4 10.255.253.1:445 *:* When I get the hang, it looks like this: # sockstat | grep 445 root smbd 7828 23 tcp4 10.255.253.1:445 = 10.255.253.2:57355 root smbd 76917 19 tcp4 127.0.0.1:445 *:* root smbd 76917 20 tcp4 10.255.253.1:445 *:* and the GDB session: # gdb /usr/local/sbin/smbd 7828 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 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=20 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 "amd64-marcel-freebsd"... Attaching to program: /usr/local/sbin/smbd, process 7828 Reading symbols from /usr/local/lib/libldap-2.3.so.2...done. Loaded symbols for /usr/local/lib/libldap-2.3.so.2 Reading symbols from /usr/local/lib/liblber-2.3.so.2...done. Loaded symbols for /usr/local/lib/liblber-2.3.so.2 Reading symbols from /usr/local/lib/libcups.so.2...done. Loaded symbols for /usr/local/lib/libcups.so.2 Reading symbols from /usr/lib/libssl.so.5...done. Loaded symbols for /usr/lib/libssl.so.5 Reading symbols from /lib/libcrypto.so.5...done. Loaded symbols for /lib/libcrypto.so.5 Reading symbols from /lib/libz.so.4...done. Loaded symbols for /lib/libz.so.4 Reading symbols from /lib/libm.so.5...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /lib/libcrypt.so.4...done. Loaded symbols for /lib/libcrypt.so.4 Reading symbols from /usr/lib/libpam.so.4...done. Loaded symbols for /usr/lib/libpam.so.4 Reading symbols from /usr/local/lib/libexecinfo.so.1...done. Loaded symbols for /usr/local/lib/libexecinfo.so.1 Reading symbols from /usr/local/lib/libiconv.so.3...done. Loaded symbols for /usr/local/lib/libiconv.so.3 Reading symbols from /usr/local/lib/libdmalloc.so.1...done. Loaded symbols for /usr/local/lib/libdmalloc.so.1 Reading symbols from /usr/local/lib/libpopt.so.0...done. Loaded symbols for /usr/local/lib/libpopt.so.0 Reading symbols from /lib/libthr.so.3...done. [New Thread 0x800a62e00 (LWP 100076)] Loaded symbols for /lib/libthr.so.3 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /usr/local/lib/libsasl2.so.2...done. Loaded symbols for /usr/local/lib/libsasl2.so.2 Reading symbols from /usr/local/lib/libintl.so.8...done. Loaded symbols for /usr/local/lib/libintl.so.8 Reading symbols from /usr/local/lib/nss_ldap.so.1...done. Loaded symbols for /usr/local/lib/nss_ldap.so.1 Reading symbols from /usr/lib/libcom_err.so.4...done. Loaded symbols for /usr/lib/libcom_err.so.4 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 [Switching to Thread 0x800a62e00 (LWP 100076)] 0x0000000801f01d6c in select () from /lib/libc.so.7 (gdb) directory /usr/ports/net/samba32-devel/work/samba-3.2.7/source/ Source directories searched:=20 /usr/ports/net/samba32-devel/work/samba-3.2.7/source:$cdir:$cwd (gdb) bt #0 0x0000000801f01d6c in select () from /lib/libc.so.7 #1 0x0000000801d0f4d4 in select () from /lib/libthr.so.3 #2 0x00000000006749fe in sys_select (maxfd=3D24, readfds=3D0x7fffffffd420, = writefds=3D0x7fffffffd3a0, errorfds=3D0x0, tval=3D0x7fffffffd500) at lib/select.c:93 #3 0x00000000004df64c in smbd_process () at smbd/process.c:839 #4 0x0000000000854074 in main (argc=3D2, argv=3D0x7fffffffd638) at=20 smbd/server.c:1450 (gdb) frame 2 #2 0x00000000006749fe in sys_select (maxfd=3D24, readfds=3D0x7fffffffd420, = writefds=3D0x7fffffffd3a0, errorfds=3D0x0, tval=3D0x7fffffffd500) at lib/select.c:93 93 ret =3D select(maxfd,readfds2,writefds,errorfds,tval); (gdb) print tval $1 =3D (struct timeval *) 0x7fffffffd500 (gdb) print *tval $2 =3D {tv_sec =3D 59, tv_usec =3D 999977} (gdb) The program is running. Quit anyway (and detach it)? (y or n) y Detaching from program: /usr/local/sbin/smbd, process 7828 The following is a truss of the process until I have seen the switch to=20 root as owner: # time truss -p 8307 gettimeofday({1234648077.989004 },0x0) =3D 0 (0x0) gettimeofday({1234648077.989081 },0x0) =3D 0 (0x0) select(24,{6 23},{},0x0,{21.288167 }) =3D 0 (0x0) gettimeofday({1234648099.279293 },0x0) =3D 0 (0x0) gettimeofday({1234648099.279370 },0x0) =3D 0 (0x0) gettimeofday({1234648099.279417 },0x0) =3D 0 (0x0) select(24,{6 23},{},0x0,{59.989982 }) =3D 1 (0x1) gettimeofday({1234648102.286493 },0x0) =3D 0 (0x0) read(23,"\0\0\0r",4) =3D 4 (0x4) read(23,"\M^?SMB2\0\0\0\0\^X\a\M-H\0\0\0"...,114) =3D 114 (0x72) geteuid(0x3e8,0x3e8,0x2,0x800adf750,0x2,0x800adf750) =3D 0 (0x0) getegid(0x3e8,0x3e8,0x2,0x801eadb8c,0xffffff006cf16a50,0x7fffffffd138) =3D = 0=20 (0x0) __sysctl(0x7fffffffd0a0,0x2,0x7fffffffd0bc,0x7fffffffd0b0,0x0,0x0) =3D 0 = (0x0) 0.000u 0.001s 2:36.56 0.0% 0+0k 0+0io 0pf+0w # sockstat | grep 445 glz smbd 8307 23 tcp4 10.255.253.1:445 = 10.255.253.2:57438 root smbd 76917 19 tcp4 127.0.0.1:445 *:* root smbd 76917 20 tcp4 10.255.253.1:445 *:* # ps -awxl | grep 8307 1000 8307 8556 0 44 0 34672 7984 select IX ?? 0:04.57=20 /usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf 0 8556 3273 0 8 0 4600 1204 wait I+ p0 0:00.00 truss=20 -p 8307 # sockstat | grep 445 root smbd 8307 23 tcp4 10.255.253.1:445 = 10.255.253.2:57438 root smbd 76917 19 tcp4 127.0.0.1:445 *:* root smbd 76917 20 tcp4 10.255.253.1:445 *:* # ps -awxl | grep 8307 0 8307 8556 0 44 0 34672 7984 select SX ?? 0:04.57=20 /usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf 0 8556 3273 0 8 0 4600 1204 wait I+ p0 0:00.00 truss=20 -p 8307 I can recreate this at any time and the condition can be cleared in two=20 ways: - killing the offending smbd process and the PC reconnects just fine - attach and detach truss, as can bee seen in the logs below taken after=20 the truss session above: # sockstat | grep 445 glz smbd 8307 23 tcp4 10.255.253.1:445 = 10.255.253.2:57438 root smbd 76917 19 tcp4 127.0.0.1:445 *:* root smbd 76917 20 tcp4 10.255.253.1:445 *:* # ps -awxl | grep 8307 1000 8307 76917 0 44 0 34672 7984 select S ?? 0:04.58=20 /usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf /glz ................................................... the future isMobile Goran Lowkrantz <goran.lowkrantz@ismobile.com> System Architect, isMobile, Aurorum 2, S-977 75 Lule=C3=A5, Sweden Phone: +46(0)920-75559 Mobile: +46(0)70-587 87 82 Fax: +46(0)70-615 87 82 http://www.ismobile.com ...............................................
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6142197C185AA728E9D4345C>