Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sshfs 2.10 freezes when mount dir is in $PATH #216

Closed
gwillem opened this issue Jun 16, 2020 · 2 comments
Closed

sshfs 2.10 freezes when mount dir is in $PATH #216

gwillem opened this issue Jun 16, 2020 · 2 comments

Comments

@gwillem
Copy link

gwillem commented Jun 16, 2020

Thanks for making & maintainin sshfs!

I know I am reporting about an old version, but it's the one shipped with Ubuntu 20.04 LTS and it may be a useful reference for others. Been pulling my hair for days about this one.

Symptom: sshfs hangs on a syscall during mounting, will stay in D status, and other processes (notably ps, man) hang as well, until the sshfs process has been terminated with a SIGKILL.

$ sshfs -odebug,sshfs_debug,loglevel=debug -d -o idmap=user -o uid=1000 -o gid=1000 -o IdentityFile=/tmp/key -o IdentitiesOnly=true root@sshserver: /home/willem/.shared
SSHFS version 2.10.0
FUSE library version: 2.9.9
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-ologlevel=debug> <-oIdentityFile=/tmp/key> <-oIdentitiesOnly=true> <-2> <root@sshserver> <-s> <sftp>
^Cread: Interrupted system call

This happened to me after upgrading from Ubuntu 16.04 to 20.04. The latter has sshfs version 3.6.0+repack+really2.10-0ubuntu1, I'm not sure what went on in that odd package naming, but sshfs self-reports version 2.10.

I've done some experimenting, and can only reproduce the hang for a specific mount dir. Specifically, mounting on /home/willem/.shared does NOT work, but mounting on /home/willem/.shared2 (or anything else really) does work.

The hang only occurs when mounting as user. When mounting (using exact same location/paths/keys) as root it does work normally.

Removing and recreating /home/willem/.shared does not help.

Running the sshfs -d-reported ssh command line does work fine.

Unsetting SSH_AUTH_SOCK does not help (nor using -oIdentitiesOnly)

I have tried several SSH servers but it did not seem to matter.

lsof -n | grep .shared does not list anything.

Alternative paths with the same length, and exactly same permissions do work fine.

I have completely disabled apparmor, just to be sure.

I am unsure how to debug further, as strace does not seem to work on sshfs when ran as user (and I cannot reproduce the error when ran as root).

It does not depend on my hardware or network connection, because I have the same problem on both desktop & laptop (both after a clean Xubuntu 20.04 install)

Regular SSH connections to these locations work fine.

For now, I have solved it by picking a different mount path.

@Nikratio
Copy link
Contributor

Thanks for reporting this! Regarding the version number: it looks like Ubuntu packaged SSHFS 3.x at some point, then decided that they'd rather ship 2.x. This explains the weird looking version number - it is truly SSHFS 2.x but packaged in a way to appear "newer" than SSHFS 3.x.

Is it possible that the path you're having the problems with is in $PATH? This does not currently work because SSHFS performs the mount before forking ssh. So if finding the SSH binary requires looking at the mountpoint, things will get stuck.

@gwillem
Copy link
Author

gwillem commented Jun 18, 2020

Thank you kindly!! Problem solved :D

@gwillem gwillem closed this as completed Jun 18, 2020
@gwillem gwillem changed the title sshfs 2.10 hangs on system call for specific mount path sshfs 2.10 freezes when mount dir is in $PATH Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants