Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66318 - problems with mounting samba shares (kernel error)
Summary: problems with mounting samba shares (kernel error)
Status: RESOLVED DUPLICATE of bug 72968
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-04 09:00 UTC by Lukas Kuczera
Modified: 2005-07-28 04:40 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Kuczera 2004-10-04 09:00:32 UTC
I have a samba server on gentoo where is stored music, i`m used to mount this share with "mount -t smbfs" to play it in xmms and xmms sometimes hangs. dmesg gives me this:
[kernel] smb_proc_readdir_long: error=-13, breaking
[kernel] smb_add_request: request [c30690c0, mid=50117] timed out!
[kernel] smb_add_request: request [c30690c0, mid=50117] timed out!
...
[kernel] smb_add_request: request [c30690c0, mid=50117] timed out!

I have found on some forum that it is bug in kernel.




Reproducible: Sometimes
Steps to Reproduce:
1.mount -t smbfs -o guest /path-to-share /path-to-mountpoint
2.xmms &
3.add /path-to-share to playlist

Actual Results:  
system hangs, one time i had to make hard reset, xmms hangs, xmms runs veeeery 
slooooow, xmms hangs but music is played still


sory for my english.
kukems
Comment 1 Christian Andreetta (RETIRED) gentoo-dev 2004-10-08 06:29:52 UTC
Some questions for you :-)
1) server 'emerge info'
2) client 'emerge info'/specs
3) References of the kernel bug
and a suggestion:
try with "use sendfile = no" in smb.conf (I don't know if it's your case, but try looking at smb.conf man)
Comment 2 Ulrich Plate (RETIRED) gentoo-dev 2004-10-15 08:34:58 UTC
I'm not him, but I'm having the same type of error message, so I suppose it's related. My samba shares get disconnected (timeout, signal failure) every now and then, I haven't found a regular pattern yet, but both clients I'm having these errors on do indeed have similar kernels (2.6.9-rc2-mm[12]).

The shares are on a corporate FreeBSD (4.6.2-RELEASE) server, I don't have admin rights on that machine, and it really shouldn't matter...

emerge info from two clients behaving the same:

1. Laptop

Portage 2.0.51_rc9 (default-x86-1.4, gcc-3.4.2, glibc-2.3.4.20041006-r0, 2.6.9-rc2-mm2 i686)
=================================================================
System uname: 2.6.9-rc2-mm2 i686 Pentium III (Coppermine)
Gentoo Base System version 1.5.3
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux-headers-2.4.21,sys-kernel/linux-headers-2.4.22
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distcc fixpackages sandbox userpriv usersandbox"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.inode.at/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa apm arts avi berkdb bitmap-fonts canna cdr cjk crypt cups encode esd f77 faad fbcon foomaticdb gdbm gif gimpprint gpm gtk gtk2 guile imlib java jpeg kde libg++ libwww mad matroska mikmod motif moznocompose moznoirc moznomail mozsvg mpeg ncurses nls oggvorbis opengl operanom2 oss pam pcmcia pdflib perl png python qt quicktime readline samba sdl slang spell ssl svg svga tcpd tetex truetype unicode wifi wxwindows x86 xface xfs xml2 xmms xprint xv"

2. Desktop

Portage 2.0.51_rc9 (default-x86-1.4, gcc-3.4.2, glibc-2.2.5-r2,glibc-2.3.4.20041006-r0, 2.6.9-rc2-mm1 i686)
=================================================================
System uname: 2.6.9-rc2-mm1 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz
Gentoo Base System version 1.5.3
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux-headers-2.4.18,sys-kernel/linux-headers-2.4.22
Libtools: sys-devel/libtool-1.5.2-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distcc distlocks fixpackages sandbox userpriv usersandbox"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.linux.ee/pub/gentoo/distfiles/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X X509 aalib alsa apm arts avi berkdb bitmap-fonts bonobo canna cdr cjk crypt cups dvd edl encode esd f77 fbcon foomaticdb gdbm gif gimp gimpprint gnome gpm gtk gtk2 gtkhtml guile imap imlib java jpeg kde ldap libcaca libg++ libwww mad matroska mikmod mmx motif mozilla mpeg mule ncurses nls oggvorbis ooo-kde opengl oss pam pdflib perl png python qt quicktime readlinescanner sdl slang spell ssl svg svga tcltk tcpd tetex truetype unicode usb wxwindows x86 xface xfs xml2 xmms xprint xv xvid zlib video_cards_radeon"
Comment 3 Michael Glauche (RETIRED) gentoo-dev 2004-10-15 08:44:53 UTC
can you try mounting them as cifs (as opposed to smbfs ?)

Comment 4 Matthias Prager 2004-10-15 08:58:42 UTC
I have a similar Problem - using a mounted samba share I get errors on the client and server side. Both use Gentoo, Samba 3.0.7 and gentoo-dev-sources-2.6.8-r8.

Client side log (this line is repeating with incresed mid= about twice in am minute):
[kernel] smb_add_request: request [e966fec0, mid=50948] timed out!

Server side (at the same time):
[smbd] [2004/10/15 02:31:14, 0] lib/util_sock.c:get_peer_addr(1000)_
[smbd] getpeername failed. Error was Der Socket ist nicht verbunden_
[smbd] [2004/10/15 02:31:14, 0] lib/util_sock.c:get_peer_addr(1000)_
[smbd] getpeername failed. Error was Der Socket ist nicht verbunden_
[smbd] [2004/10/15 02:31:14, 0] lib/util_sock.c:write_socket_data(430)_
[smbd] write_socket_data: write failure. Error = Die Verbindung wurde vom Kommunikationspartner zur
Comment 5 Matthias Prager 2004-10-15 08:58:42 UTC
I have a similar Problem - using a mounted samba share I get errors on the client and server side. Both use Gentoo, Samba 3.0.7 and gentoo-dev-sources-2.6.8-r8.

Client side log (this line is repeating with incresed mid= about twice in am minute):
[kernel] smb_add_request: request [e966fec0, mid=50948] timed out!

Server side (at the same time):
[smbd] [2004/10/15 02:31:14, 0] lib/util_sock.c:get_peer_addr(1000)_
[smbd] getpeername failed. Error was Der Socket ist nicht verbunden_
[smbd] [2004/10/15 02:31:14, 0] lib/util_sock.c:get_peer_addr(1000)_
[smbd] getpeername failed. Error was Der Socket ist nicht verbunden_
[smbd] [2004/10/15 02:31:14, 0] lib/util_sock.c:write_socket_data(430)_
[smbd] write_socket_data: write failure. Error = Die Verbindung wurde vom Kommunikationspartner zurückgesetzt_
[smbd] [2004/10/15 02:31:14, 0] lib/util_sock.c:write_socket(455)_
[smbd] write_socket: Error writing 4 bytes to socket 22: ERRNO = Die Verbindung wurde vom Kommunikationspartner zurückgesetzt_
[smbd] [2004/10/15 02:31:14, 0] lib/util_sock.c:send_smb(647)_
[smbd] Error writing 4 bytes to client. -1. (Die Verbindung wurde vom Kommunikationspartner zurückgesetzt)_

Further more, yesterday I got a severe Kernel Error (untainted kernel btw.) which appeared on the console of the server - unfortuantly I didn't write it down, but it occured around the time when I first noticed the symptom (which was shortly after I emerged samba-3.0.7 and the new kernel).

I already tried using "use sendfile = no" in smb.conf - didn't change anything.

I'm now tring to downgrade samba to 3.0.6-r4 to see if this solves anything.

Also I found a lot of similar reports thrueout the net having these Problems.
One report said using a different Networkcard (instead of the onboard) solved the issue - I didn't have time to test this yet, but my server has a SIS900 internal Network card. - for my part I think there could be serveral trouble sources involved (samba issue (most definitly), kernel-networkcard-driver issue (maybe), and for me eventualy a hardware problem [faulty onboardnetwork](unprobable - worked without any problems so far)).

P.S. Windows XP (incl. SP2) as Client is working fine with this server (except for the same Messages in the servers log.

emerge info output (server side):
Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.8-gentoo-r8)
=================================================================
System uname: 2.6.8-gentoo-r8 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.4.16
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="apache2 apm berkdb bitmap-fonts crypt f77 gdbm gif gpm imlib jpeg libg++ libwww linguas_de mysql ncurses nls pam pdflib perl png python readline slang ssl tcpd x86 xml xml2 xprint zlib"
Comment 6 Matthias Prager 2004-10-15 09:47:54 UTC
Downgrading to samba-3.0.6-r4 on either side (client+server) didn't help (using smbfs):

client log:
[kernel] smb_add_request: request [e479dc40, mid=8052] timed out!

server log:
[smbd] [2004/10/15 18:41:38, 0] lib/util_sock.c:read_socket_data(384)_
[smbd] read_socket_data: recv failure for 4. Error = Die Verbindung wurde vom Kommunikationspartner zur
Comment 7 Matthias Prager 2004-10-15 09:47:54 UTC
Downgrading to samba-3.0.6-r4 on either side (client+server) didn't help (using smbfs):

client log:
[kernel] smb_add_request: request [e479dc40, mid=8052] timed out!

server log:
[smbd] [2004/10/15 18:41:38, 0] lib/util_sock.c:read_socket_data(384)_
[smbd] read_socket_data: recv failure for 4. Error = Die Verbindung wurde vom Kommunikationspartner zurückgesetzt_
[smbd] [2004/10/15 18:43:28, 0] lib/util.c:smb_panic2(1385)_
[smbd] PANIC: PANIC: deferred_open_entries_identical: logic error._
[smbd] _
[smbd] [2004/10/15 18:43:28, 0] lib/util.c:smb_panic2(1393)_
[smbd] BACKTRACE: 1 stack frames:_
[smbd] #0 /usr/sbin/smbd(smb_panic2+0x1b9) [0x81bf21f]_

Using CIFS however no errors occured! (neither on the server nor on the client side)

Although this "fix" makes samba usable again it does not realy solve the issue.
Comment 8 Matthias Prager 2004-10-15 10:39:39 UTC
Correction:
I fogot to restart samba on my client.
So here are my correct results:
using samba-3.0.6-r4 on both sides without "use sendfile = no" produces errors.
using samba-3.0.6-r4 on both sides with "use sendfile = no" produces no errors!

So I upgraded to samba-3.0.7-r1 again (both sides) and tried again - same results.
Conclusion: the reason for the errors was the usage of sendfile which as far as I know was endabled by default since 3.0.6. Although there is a hint when you emerge samba suggesting the use of "use sendfile = no" it does not clearly state you need to do this on both the server and the client side.

I suggest a change in the .ebuild so that either the hint is more clear or including a patch which changes the default behavior from samba back to "use sendfile = no". (That is of cause if this solves the problems from Lukas Kuczera :) ).

Also someone might contact the samba developers, requesting a change back to safe setting (default should then be "use sendfile = no").
Comment 9 Michael Glauche (RETIRED) gentoo-dev 2004-10-15 11:07:00 UTC
Ok, i'm going to add some big fat warning to the ebuild :)
Comment 10 Ulrich Plate (RETIRED) gentoo-dev 2004-10-18 13:35:04 UTC
Apologies, I had forgotten to put my address on the cc list, that's why I haven't seen your comments until today. 

I've tried to mount with CIFS rather than smbfs, but I'm getting "CIFS VFS: Send error SessSetup = -13" mount failures. I'm sorry, I can only influence what's happening on the client side, and I suspect there may be a few more people like me: As I've mentioned before, the samba shares I'm accessing are on a corporate file server, and its admin would have me publicly flogged if I touched his config files. So even if that "use sendfile = no" option would work, it isn't really a fix as long as it's out of people's reach.

One thing I don't understand is that I've had this problem only since last week, but my upgrades to samba 3.0.6 date back two, to 3.0.7 one month. Even 3.0.7-r1 was emerged on 20 September already, well before all this trouble started. I've had no kernel changes since that date, either.
Comment 11 Christian Andreetta (RETIRED) gentoo-dev 2004-10-19 01:11:38 UTC
Ulrich (comment #8): maybe an upgrade was made on the server. I think this is due to a low level system call, so kernel is the first suspect 
Comment 12 Robert Davis 2004-11-01 12:14:10 UTC
I have a similar problem.  mount -t smbfs and it times out after about 15 mins until I unmount and remount.  Here is the error in the everything log. '[kernel] smb_add_request: request [c239be80, mid=481] timed out!'  I have samba emerged but not running when I got this.
Comment 13 Robert Davis 2004-12-08 07:42:43 UTC
My problem was fixed with 3.0.8-r2 and now on 3.0.9 with no problem.  Don't know how the kernel smbfs hooks into samba to fix it.
Comment 14 Ulrich Plate (RETIRED) gentoo-dev 2004-12-08 08:22:43 UTC
Unless somebody says it still bites, I'd consider this bug dead. Haven't had trouble in a while, on none of my desk- and laptops. Currently working configurations are various 2.6.9 kernels (mm-sources r1, gentoo-dev-sources r5) and samba 3.0.9. Nothing else has changed, in particular, nobody touched the server, ever... It's still doing the exact same thing it was doing two months ago.
Comment 15 Vitaly Harisov 2005-03-07 00:46:30 UTC
Seems that this bug is a duplicate to bug 72968.
Comment 16 Seemant Kulleen (RETIRED) gentoo-dev 2005-07-28 04:40:42 UTC

*** This bug has been marked as a duplicate of 72968 ***