sshfs mounts occasionally lock up
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sshfs-fuse (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
This is similar to bug #137514. However, that bug has stopped manifesting for me a while time ago. (But see comment #15 there.) Ever since I upgraded to Lucid, the bug (or something similar) started manifesting, even worse than before.
Description:
I have several disks on a headless server, and I mount them on my desktop using SSHfs. The server runs Karmic, the desktop Lucid.
The problem is that every now and then one (or more) of the sshfs mounts lock up. What this means depends on the program using the mountpoint. If Amarok is playing a song, it stops generating sound, but I can press “stop” and play some local files. If it’s Nautilus or even a “ls” in a terminal, it freezes until killed. I’ve had a few cases of programs turning zombie, too (I had to reboot to release the mountpoints).
It’s not deterministic, but it seems to happen more often (but not exclusively) when the mount is used more intensely, ie when several programs access it at the same time.
Most frequently it’s the mountpoint with music that does this (simply because I have music playing almost all the time); in those cases I can stop Amarok and try to unmount everything. This tends not to work:
$ unmount-all [a script that unmounts every SSHfs mount]
umount: /media/corum: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
Invariably both lsof and fuser lock up if I try to use them. Usually I can just kill the SSHfs and ssh processes, and _if_ nothing else is accessing the mountpoint (e.g., if I stop Amarok), I can then unmount.
However, if something still holds an open file on those filesystems, bad things (TM) happen. For instance, MusicBrainz Picard enters a zombie state:
bogdanb@mabelode:~$ ps aux|grep picard
bogdanb 2107 2.5 0.0 0 0 ? Zl 20:19 0:43 [picard] <defunct>
AFAIK, there’s nothing I can do to get rid of it, except rebooting. I can of course mount things in a different place, but lots of programs expect things to be in a specific place (eg, my music library).
This report was started with ubuntu-bug, giving it the pid of a sshfs process that locked up. Below are strace calls on the sshfs process (pid 2000) and ssh process (pid 1996) involved; they both stop after the NULL, and I pressed Ctrl-C:
bogdanb@mabelode:~$ sudo strace -p 2000
Process 2000 attached - interrupt to quit
futex(0x7fff3e3
Process 2000 detached
bogdanb@mabelode:~$ sudo strace -p 1996
Process 1996 attached - interrupt to quit
select(7, [3], [], NULL, NULL^C <unfinished ...>
Process 1996 detached
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: sshfs 2.2-1build1
ProcVersionSign
Uname: Linux 2.6.32-19-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Sat Apr 3 20:27:57 2010
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/sshfs
ProcEnviron:
LANGUAGE=en_US:en
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: sshfs-fuse
Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!
I have sent this upstream by message to 'fuse-sshfs <fuse-
<email address hidden>>' and we will now await a response.
Thanks for taking the time to make Ubuntu better!