Bug 4363 - cifs mount does not unmount even on shutdown
Summary: cifs mount does not unmount even on shutdown
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: x86 Linux
: P3 critical
Target Milestone: ---
Assignee: Steve French
QA Contact:
Depends on:
Reported: 2007-02-01 15:33 UTC by Sergei Zuyev
Modified: 2007-05-11 05:03 UTC (History)
2 users (show)

See Also:

dmesg after 1 minute of attempted umount.cifs (121.29 KB, text/plain)
2007-03-17 05:37 UTC, Sergei Zuyev
no flags Details
dmesg after 2 minutes of attempted umount.cifs (120.04 KB, text/plain)
2007-03-17 05:38 UTC, Sergei Zuyev
no flags Details
dmesg after 5 minutes after kill umount.cifs completed (109.82 KB, text/plain)
2007-03-17 05:39 UTC, Sergei Zuyev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Zuyev 2007-02-01 15:33:50 UTC
I am running kernel 2.6.17 compiled from sources coming with Mandriva 2006 Official. I am mounting a samba public directory on a linux server via :
//kalitka/public /mnt/smb cifs users,rw,noauto,file_mode=0775,dir_mode=0775,iocharset=utf8 0 0

It is mounting OK (mount shows
//kalitka/public on /mnt/smb type cifs (rw,mand,noexec,nosuid,nodev,user=sergei)

and I didn't have any problems until recently, perhaps after upgrade of samba to samba-client-3.0.20-3.1.20060mdk (the server kalitka samba version is the same: samba-server-3.0.20-3.1.20060mdk)

Now the cifs mount does not unmount at all, whatever I try to do it manually or when the machine is going down, umount.cifs3 is stalled and dmesg shows constantly growing number of lines of type:

 CIFS VFS: No response for cmd 50 mid 7076
 CIFS VFS: No response for cmd 50 mid 7080
 CIFS VFS: No response for cmd 50 mid 7752

The only way to switch the machine off I found  is to put the keyboard in raw mode and reboot.

How can I help you to debug this?
Comment 1 Sergei Zuyev 2007-02-02 03:39:33 UTC
I tried with Mandriva's stock kernel kernel.h-2.6.11-13mdk-i686-up-4GB in safe mode. It's still not unmounting, but the errors reported are:

CIFS VFS: No response buffer
CIFS VFS: Send error in QFSInfo = -11

Maybe, this is of any help...
Comment 2 shirishpargaonkar@gmail.com 2007-03-15 10:07:01 UTC
-11 is -EAGAIN, cmd 50 is SMB_COM_TRANSACTION2

Before unmounting, are you able to list the contents of mounted directory i.e.
ls /mnt/smb or change directory to the mounted filesystem i.e. cd /mnt/smb?
What does   mount  command output?

You can turn on cifs debugging by issuing a command like this:
echo 1 > /proc/fs/cifs/cifsFYI

Issue dmesg -c  just before umount.cifs, issue umount.cifs and when it returns,
save the syslog buffer with a command like   dmesg > <file_name> and post
that file.

But I think this problem is specific to your environment.  
I tried the same with 1.48 of cifs on a SLES10 box with umount.cifs -V of this
 umount.cifs version: 0.5-3.0.22-3-SUSE-CODE10
and I do not see the same problem as you do.
Comment 3 Sergei Zuyev 2007-03-17 05:37:52 UTC
Created attachment 2339 [details]
dmesg after 1 minute of attempted umount.cifs
Comment 4 Sergei Zuyev 2007-03-17 05:38:49 UTC
Created attachment 2340 [details]
dmesg after 2 minutes of attempted umount.cifs
Comment 5 Sergei Zuyev 2007-03-17 05:39:56 UTC
Created attachment 2341 [details]
dmesg after 5 minutes after kill umount.cifs completed
Comment 6 Sergei Zuyev 2007-03-17 05:46:59 UTC
Mount of the volume works normally, nothing is reported. I can access and work with the mounted volume normally. I've done as you suggested, the thing is that umount never finishes showing ever increasing disk activity. The attached files is dmesg after different time intervals after attempted umount and the last one after explicit kill -15 of umount.cifs process (which took about 3 minutes to complete). The volume stayed mounted after that.
Comment 7 Sergei Zuyev 2007-03-17 05:51:59 UTC
Since I experience this problem with two different samba-clients machines - one is under Mandriva 2006 another is Mandriva 2007, the problem maybe on the server side which is also Mandriva 2006 linux box. The version there is:
Comment 8 shirishpargaonkar@gmail.com 2007-03-27 09:52:00 UTC
In the syslog, there are no Tree Disconnect and Logoff requests/commands.
So I do not understand after umount command, why are not such requests sent.

Can you please generate one more output file with these commands, assuming
you have already issued commands
 echo 1 > /proc/fs/cifs/cifsFYI
and additionaly
 echo 1 > /proc/fs/cifs/traceSMB

dmesg -c; umount <mounted_directory>; dmesg >   <log_file> 
and post that log file.
Comment 9 Sergei Zuyev 2007-05-11 05:03:40 UTC
Dear Shirish,
Sorry for the delay - I was away from home for a business trip. Upon my return I have upgraded the server to Mandriva 2007 (samba-server-3.0.23d-2.1mdv2007.0) and ported it onto a new platform (full system on two software raid SATA disks) and the problem seem to have gone ;-)
Thank you for your assistance and time anyway!
Best wishes,