sshfs crashes on one of my machines

I use sshfs (sysutils/fusefs-sshfs) a lot, it is handy to just mount a storage space (on a NAS or fileserver) when I need it. And it usually works well.
However, on this one machine it just crashes whenever I try to mount a remote server. Like this:
Code:
tingo@kg-v2$ sshfs tingo@f3:/mnt/zstore/home-tingo ~/mpoint
tingo@kg-f3.kg4.no's password: 
tingo@kg-v2$
tingo@kg-v2$ ll
ls: mpoint: Bad file descriptor
df -h output
Code:
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad4s2a    495M    358M     97M    79%    /
devfs          1.0k    1.0k      0B   100%    /dev
/dev/ad4s2e    495M     91M    364M    20%    /tmp
/dev/ad4s2f    102G     90G    4.1G    96%    /usr
/dev/ad4s2d    8.6G    997M    6.9G    12%    /var
procfs         4.0k    4.0k      0B   100%    /proc
linprocfs      4.0k    4.0k      0B   100%    /usr/compat/linux/proc
fdescfs        1.0k    1.0k      0B   100%    /dev/fd
/dev/fuse0       0B      0B      0B   100%    /usr/home/tingo/.gvfs
/dev/fuse1       0B      0B      0B   100%    /usr/home/tingo/mpoint
try to umount it:
Code:
tingo@kg-v2$ umount ~/mpoint
umount: /home/tingo/mpoint: stat: Bad file descriptor
umount: /home/tingo/mpoint: unknown file system
tingo@kg-v2$ umount -f ~/mpoint
umount: /home/tingo/mpoint: stat: Bad file descriptor
umount: /home/tingo/mpoint: unknown file system
If I look in /var/log/messages I see this:
Code:
Jan 26 15:18:11 kg-v2 kernel: pid 10130 (sshfs), uid 1001: exited on signal 11
and no core dumps.
The machine is running 8.3-stable:
Code:
tingo@kg-v2$ uname -a
FreeBSD kg-v2.kg4.no 8.3-STABLE FreeBSD 8.3-STABLE #6: Fri Apr 27 23:50:55 CEST 2012
     root@kg-v2.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64
and the relevant ports are up to date:
Code:
root@kg-v2# portversion -v | grep fuse
fusefs-gphotofs-0.4.0_1     =  up-to-date with port 
fusefs-kmod-0.3.9.p1.20080208_11  =  up-to-date with port 
fusefs-libs-2.9.2           =  up-to-date with port 
fusefs-sshfs-2.4            =  up-to-date with port

I've tried a number of different servers, sshfs (on this machine) crashes when I try to mount them. The same servers works fine from other machines running FreeBSD.

Any idea what I should look for?
 
I know this doesn't solve anything, but I've had similar problems on a FreeBSD 9.0 machine. I gave up and used a different solution.
If you really want sshfs to work, you could try contacting the sshfs developers...
 
Same problem here:
Code:
FreeBSD 9.0-RELEASE
fusefs-kmod-0.3.9.p1.20080208_11
fusefs-libs-2.9.2
fusefs-ntfs-2012.1.15
fusefs-sshfs-2.4
 
I got a kind of by-pass... I noted that the connection keeps alive while I just use the terminal. If I open the files from Thunar or from the the Open... command the connection drops but if, for example, I do geany /path/to/the_file it remains open and I can edit the file without problems.

I hope this helps

Cheers.
 
@cug: thanks.

It won't help in my situation; I use sshfs with Worker (or Thunar) for copying / file access purposes.
 
Last edited by a moderator:
sshfs was never exceptionally stable, but since I upgraded to 9.1 it got really bad.

My system and ports are compiled using system clang 3.1 and since sshfs seems to crash in libgthread, I tried rebuilding devel/glib20 using system gcc 4.2.1:

CC=gcc CXX=g++ portmaster devel/glib20

This definitely improved the situation for me, it's stable enough for day to day tasks now.
 
Doesn't help for my situation: main workstation is running FreeBSD 8.3-STABLE, and there is no Clang here. :-/
 
Nope. Details:
Code:
tingo@kg-v2$ uname -a
FreeBSD kg-v2.kg4.no 8.3-STABLE FreeBSD 8.3-STABLE #6: Fri Apr 27 23:50:55 CEST 2012
     root@kg-v2.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64
tingo@kg-v2$ which gcc
/usr/bin/gcc
tingo@kg-v2$ gcc -v
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]
 
No. I can do that - if you present an interesting enough reason why I should do so. Otherwise, you are just suggesting random things in the hope that one of them will work.
 
tingo said:
if you present an interesting enough reason why I should do so. Otherwise, you are just suggesting random things in the hope that one of them will work.
As they would say on Wikipedia: Please don't bite the newbies. (subtle hint)
 
You get what you ask for

Any idea what I should look for?

There are different ways to crash sshfs. For me it got a lot more stable since I used gcc instead of clang, but it still crashes occasionally.

Setting COLLATION_FIX helped the author of PR PR 176874, with who I've been in contact lately, but it's probably only relevant if you're using the iconv module like in sshfs -o iconv,to_code=utf-8,from_code=iso8859-1.
 
Set up a brand new workstation, using FreeBSD 8.4-stable and newest ports. sshfs still crashes :-(
Details:
Code:
tingo@kg-core1$ uname -a
FreeBSD kg-core1.kg4.no 8.4-STABLE FreeBSD 8.4-STABLE #0 r253646: Thu Jul 25 10:12:31 UTC 2013
     root@kg-core1.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64
tingo@kg-core1$ portversion -v *ssh* *fuse*
fusefs-gphotofs-0.4.0_1     =  up-to-date with port 
fusefs-kmod-0.3.9.p1.20080208_11  =  up-to-date with port 
fusefs-libs-2.9.3           =  up-to-date with port 
fusefs-sshfs-2.4            =  up-to-date with port 
linux-f10-libssh2-0.18      =  up-to-date with port
I really wish I could figure out what the problem is. sshfs is stable on other platforms.
 
I don't know (yet). But the problem is still annoying as hell on my FreeBSD 8.4-STABLE workstation.
 
And another frustrating session this evening. The most frustrating thing is that I can't seem to figure out a pattern, it seems random how many files or how much data I can copy before sshfs crashes.
 
FWIW, I tested on a machine running FreeBSD 10.0-release today:
Code:
$ uname -a
FreeBSD kg-v7.kg4.no 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014
     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
First I connected from the 10.0 machine (via sshfs) to my main workstation and copied the files from there.
Next, I connected from the 10.0 machine to a different machine (still via sshfs) to a different machine and copied the files there.
Finally, I copied the files from the 10.0 machine to a third machine.
All without problems.
So yes, it appears that sshfs is stable (or more stable) under FreeBSD 10.0-release.
 
Back
Top