Bug 5864 - Failing mount kills established connections
Summary: Failing mount kills established connections
Status: RESOLVED FIXED
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: x86 Linux
: P3 major
Target Milestone: ---
Assignee: Steve French
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-31 12:01 UTC by Jan-Marek Glogowski
Modified: 2009-03-09 12:20 UTC (History)
2 users (show)

See Also:


Attachments
sh -x log of the script used to repoduce the error (5.15 KB, text/plain)
2008-10-31 12:08 UTC, Jan-Marek Glogowski
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Marek Glogowski 2008-10-31 12:01:33 UTC
I'm running Samba 3.0.24 from Debian Etch and 2.6.26-1-686_2.6.26-10 from SID.

CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
CONFIG_CIFS_WEAK_PW_HASH=y
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
# CONFIG_CIFS_DEBUG2 is not set
CONFIG_CIFS_EXPERIMENTAL=y
CONFIG_CIFS_UPCALL=y
CONFIG_CIFS_DFS_UPCALL=y

MultiuserMount = 1
LinuxExtensionsEnabled = 0
Experimental = 0

I have different shares on the same server with different rights.

1. Mount share_1 with credentials_1 -> ok
   Server 1) SMB session status: 1 (CifsGood), Mounts: 1
   ls -l : ok
2. Mount share_2 with other wrong credentials_2 -> fails
   Server 1) SMB session status: 2 (CifsExiting), Mounts: 1
   ls -l : ok
3. Mount share_2 with other right credentials_2 -> ok
   Server 1) SMB session status: 1 (CifsGood), Mounts: 1
   Server 2) SMB session status: 2 (CifsExiting), Mounts: 1
   ls -l : ok
4. Mount share_3 with credentials_1 from share_1 -> ok
   Server 1) SMB session status: 1 (CifsGood), Mounts: 1
   Server 2) SMB session status: 1 (CifsGood), Mounts: 1
   Server 3) SMB session status: 2 (CifsExiting), Mounts: 1
   ls -l : broken, sometimes SEGFAULT

drwxr-x--- 1 limux Domain Users    0 2008-10-30 13:52 just-jmg3
?--------- ? ?     ?               ?                ? /mnt/limux/vmx1samba.tvc.muenchen.de/sb_d_10
drwxr-x--- 2 limux Domain Users    0 2008-09-29 08:23 share2

The additional info is from /proc/fs/cifs/DebugData.
All mounts are in the same directory where I do an "ls -l"

I ported other CIFS versions to 2.6.26.

This error was introduced between the 2.6.23 and 2.6.24 kernel, as the CIFS 2.6.23 module works fine with 2.6.26. I also tried a 2.6.28 version from GIT, which fails with different errors.
Comment 1 Jan-Marek Glogowski 2008-10-31 12:08:11 UTC
Created attachment 3701 [details]
sh -x log of the script used to repoduce the error
Comment 2 Steve French 2008-12-05 13:56:43 UTC
Note that Samba 3.0.24 through Samba server version 3.0.25 had a server problem with DFS path processing which can cause problems for cifs path based calls (including e.g. even things like setting the file size on a path name during file copy).   If you can't upgrade the server, when using those two Samba server versions make sure you turn DFS off on the server, or with very recent cifs (2.6.28) you can specify "nodfs" mount option.

Do you still have the same problem with cifs?
Comment 3 Steve French 2008-12-05 14:00:36 UTC
Also note that 2.6.28 (and should be in stable kernel series for 2.6.27 starting with 2.6.27.8) will include a large series of mount fixes for cifs which redo the linked list handling and make it very robust with simultaneous mounts/umounts from many processes and fixes race condititions.  This may not address the problem, but the mount code is far better now and would recommend that you try the current (cifs 1.56) version.
Comment 4 Steve French 2009-03-09 12:20:51 UTC
This looks like the DFS path processing problem that caused the parent directory to be incorrectly displayed (updating the Samba server, running with nodfs if you cifs is version 2.6.27 or later) would work.