sshfs icon indicating copy to clipboard operation
sshfs copied to clipboard

Terminal hangs on trying to access a mounted folder

Open dbogdanov opened this issue 7 years ago • 19 comments

Terminal and Finder hang on trying to access a mounted remote drive via sshfs.

macOS Sierra sshfs 2.8 osxfuse 3.5.0 Fuse library 2.9.7

dbogdanov avatar Oct 24 '16 18:10 dbogdanov

Please update FUSE to version 3.5.3 and test again. 3.5.0 contains a bug that can cause hangs.

bfleischer avatar Oct 24 '16 22:10 bfleischer

Works perfect now, thank you. I've installed sshfs and osxfuse using brew. So, I guess the installation formula is outdated.

dbogdanov avatar Oct 24 '16 23:10 dbogdanov

So, it seems that this issue is back with 3.7.1

SSHFS version 2.5 (OSXFUSE SSHFS 2.5.0) OSXFUSE 3.7.1 FUSE library version: 2.9.7 fuse: no mount point

AfzalivE avatar Oct 25 '17 00:10 AfzalivE

As far as I know SSHFS 2.5 will not work with Sierra or newer builds if trying to mount under /Volumes. SSHFS will try to create the mount point, and Sierra and newer will not let anyone except root create directories under /Volumes.

There is a working around floating around that will tell the underlying fuse driver to create the mount point, but you need a version of SSHFS that supports the mode.

mischievous avatar Oct 25 '17 13:10 mischievous

I'm not mounting under /Volumes. It works for me (mounting in my home folder) but I can't cd into it from the terminal, it freezes when I try that. Can still use Finder to explore it and everything else though.

I'm guessing I'll have to build the latest version of sshfs to try this?

The one over here works on mac? https://github.com/libfuse/sshfs

Thanks

AfzalivE avatar Oct 25 '17 17:10 AfzalivE

Same issue here. Mounting works in the finder but I can't cd into the folder from the terminal. I've tried to install a newer release of sshfs but could not build with Mason (error: Fuse3 missing).

macOS High Sierra sshfs 2.5.0 osxfuse 3.7.1

brian-cooney avatar Nov 28 '17 13:11 brian-cooney

This is my version from here ... https://github.com/mischievous/sshfs. ... I have issues with building it correctly so there are two extra libraries you need which are included in the zip file.

sshfs needs to go into /usr/local/bin, and the two libraries into /usr/local/lib. Give this one a try and see if it works.

sshfs.zip

mischievous avatar Nov 28 '17 13:11 mischievous

Experiencing the same issue with Fuse 3.7.1 and SSHFS 2.5.0 - has anyone successfully gotten it to work?

RobertHerhold avatar Jan 09 '18 04:01 RobertHerhold

In my case, switching my ohmyzsh shell theme back to the default fixed the issue. I suspect some themes introduce extra git behaviours which run fine locally but take ages to run on large mounted SSH drives.

brian-cooney avatar Jan 10 '18 16:01 brian-cooney

Im suffering the same problem, any succes yet?

madshjertstedt avatar Jan 26 '18 08:01 madshjertstedt

Same here: $ sshfs --version SSHFS version 2.10 OSXFUSE 3.5.0 FUSE library version: 2.9.7 all installed via Homebrew.

Mac OS: 10.12

"cd" into the directory -> hangs "ls -l" in the directory where the mountpoint is (my $HOME) -> hangs "Remote Disc" virtual folder in the Finder -> no thing there interestingly a "du -h" works and shows the mounted sshfs volume, too.

So stat()might hang but statfs()still seems to work. Very strange.

sshfs cannot be killed, except with kill -9. But the hanging processes still don't wakeup after killing sshfs. And even after killing sshfs any attept to stat() the former sshfs mountpoint hangs the calling process. So a reboot is required.

That is very annoying!!

RokerHRO avatar Apr 12 '18 08:04 RokerHRO

Is there a solution to this problem?

saiarigeli avatar Aug 30 '18 00:08 saiarigeli

I simply reinstalled osxfuse and sshfs and things worked out fine

aishwaryaprabhat avatar Oct 05 '18 02:10 aishwaryaprabhat

In my case, switching my ohmyzsh shell theme back to the default fixed the issue. I suspect some themes introduce extra git behaviours which run fine locally but take ages to run on large mounted SSH drives.

Same thing here. Kinda annoying tho having to be switching back and forth to the original theme. Any quick solution other than this?

xoelop avatar Oct 17 '19 16:10 xoelop

Same issue here: hanging terminal after a disconnection until reconnected, even with -o reconnect configured and various combinations of ServerAliveInterval and ServerAliveCountMax values.

phisco avatar Nov 20 '20 14:11 phisco

Was also having this problem with sshfs 2.10_2 (the version homebrew has) and OSXFuse 3.11.2.

Changed my install source to the macfuse website (gives sshfs 2.5) and the problem is seemingly gone.

On MacOS Catalina 10.15.7, curious if this is actually the same bug recurring in some way or something unrelated.

Shadowsoftime99 avatar Feb 22 '21 22:02 Shadowsoftime99

I had the same problem and I found the reason for it: In my case I was calling zsh; exit in my .bashrc (because the server was using bash by default). This caused my sshfs to freeze!

tbrodbeck avatar May 18 '21 18:05 tbrodbeck

I'm wondering how this issue is open for 5 years!!!

parsanoori avatar Jan 21 '22 23:01 parsanoori

For me the issue was somehow resolved by installing not the newest but older version of the osxFUSE package. Current newest version is 4.4.1 and I installed 4.1.2 (because this guy installed it in a video long time ago: https://www.youtube.com/watch?v=TxUF0rXOV5E (I wasn't looking for any logic about this other than my OS isn't the newest one)). I didn't know which older version to try so I tried that one.

I don't know if it's the same bug but it was hanging the terminal that executed the sshfs command as well as other terminals that were trying to access the directory. My OS version: 11.6.8 20G730

Invertisment avatar Aug 28 '22 18:08 Invertisment