Mounting CIFS share hangs when server is offline

Bug #428129 reported by malbec
66
This bug affects 13 people
Affects Status Importance Assigned to Milestone
cifs-utils (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Hello, I mounted an OS X Samba share on Linux Mint 7 using smbfs.
I added to the fstab-
//server/share /media/share cifs credentials=credentialsfile,file_mode=0777,dir_mode=0777 0 0

This works, and is the preferred method in Ubuntu (as GNOME doesn't mount shares as a filesystem for other programs to access and it doesn't automount). However, if the server goes offline for any reason (restart, shutdown, router unplugged, etc.), programs in Mint gradually stall (stop responding). I had a WINE program stall, then Firefox, then Nautilus. I tried to reproduce it by shutting down the server again, and only nautilus stalled. They come back to life when the server boots back up. There may be an eventual timeout, but I didn't reach it. CIFS does not have a timeout option listed in the manual.

I realize it's expected that a fstab-listed filesystem will respond all the time, but network shares don't. I realize this won't be a Mint-only issue, but I wouldn't know who to submit it to (gnome nautilus, smbfs, CIFS-VFS, or all of them). I think this behaviour is too fragile. Please forward this bug wherever it's supposed to go. I did find this old mailinglist email, but it does not mention other programs stalling-
http://lists.samba.org/archive/linux-cifs-client/2005-February/000686.html

Thanks for the help!

EDIT: note this hangs even if run from a normal mount command, not just from fstab.

emorrp1 (emorrp1)
tags: removed: cifs freeze fstab nautilus share smbfs stall
Revision history for this message
emorrp1 (emorrp1) wrote :

Thank you for reporting a bug in Linux Mint. Unfortunately I do not have the necessary hardware to reproduce your problem. If anyone else can confirm this bug, please say so. Please check out the Linux Mint Forums, where there are many more people available to help out with diagnosing any problems you have. Please repost this in the forums, and put a link to it here, so I can track any further development. It is also exceptionally useful if you include the output of "inxi -F" when reporting hardware problems. You might also like to check out this article: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html This is a standard response, so it may not be entirely appropriate.

In your particular case, can you first make sure it is actually an fstab potential issue by removing the fstab line and using nautilus' standard "connect to server" method to see if that also causes the hangs. If that is the case then it's either a problem with cifs directly, or a problem with your networking setup, so please check out the forums for more help. Otherwise, if it's only caused by fstab then I can't really say I'm surprised, the first line of fstab's man page says "fstab - static information about the filesystems" - static being the key word here, it would be better to create a script that connects to your share, and then make the script run on startup.

Changed in linuxmint:
status: New → Incomplete
Revision history for this message
0akbeach (alexander-ekstrand) wrote :

Hi I'm running Linux mint 6 Felicia, this have been the issue for me since I mapped the cifs shares in fstab.
I have a NAS on power schedule, when it shuts off nautilus is locked down. I can't unmount the shares as the server don't exist on the network.. The only available thing is to start the server again, then all seems to start working again..

Best regards,
0akbeach

Revision history for this message
emorrp1 (emorrp1) wrote :

bumping to prevent expiration until I can look at it

Revision history for this message
Benn (benn-blessing) wrote :

On 10.04 my shutdown takes an extra minute if I don't unmount the fstab mounted samba share first. Also makes nautilus hang for a while if network is lost wile share is mounted.
Server is also 10.04 (mythbuntu).

Revision history for this message
Benn (benn-blessing) wrote :

Related thread from ubuntu forums.
http://ubuntuforums.org/showthread.php?t=1139080

Revision history for this message
sparrowt (sparrowt) wrote :

This really is a bug / issue with mount.cifs in cifs-utils.

affects: linuxmint → cifs-utils
Revision history for this message
sparrowt (sparrowt) wrote :

Actually moving to cifs-utils under Ubuntu because cifs-utils itself doesn't seem active or the correct place.

Notes: this is not an fstab problem, if you do this command manually it still hangs if the server is turned off:
mount -t cifs //server/share /media/share

affects: cifs-utils → cifs-utils (Ubuntu)
summary: - fstab mounted CIFS share causes stalls when offline
+ Mounting CIFS share hangs when server is offline
description: updated
sparrowt (sparrowt)
Changed in cifs-utils (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
ALinuxUser (buntulongername-new) wrote :

Does anyone know if there has been any progress on this, please?

Revision history for this message
ITEAS (info-tux-pc) wrote :

Interested too.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

On bionic, after firewalling off a cifs server, I just get a timeout after about 10s:

root@nsnx:~# mount //ds216.lowtech/downloads /ds216/downloads -t cifs -o username=andreas,uid=andreas
Password for andreas@//ds216.lowtech/downloads: ***
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@nsnx:~#

If I try an IP that is not up, I get a different error after about 7s:
root@nsnx:~# time mount //10.10.1.90/downloads /ds216/downloads -t cifs -o username=andreas,uid=andreas
Password for andreas@//10.10.1.90/downloads: ***
Unable to find suitable address.

real 0m7.281s

This is probably fixed then, but I'll mark this bug as incomplete pending new test cases showing that it hangs, and by hangs, I mean indefinitely.

Changed in cifs-utils (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for cifs-utils (Ubuntu) because there has been no activity for 60 days.]

Changed in cifs-utils (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.