Skip to content

sshfs crashes with cygwin exception when creating folder #64

Closed

Description

@sganis

Sshfs crashes when creating a folder in S:\tmp using explorer.
Error: cygwin_exception::open_stackdumpfile: Dumping stack trace to sshfs.exe.stackdump.

This problem happens in several machines, Windows 7 x64.
The server is Redhat 7.

sshfs command arguments:

sshfs user@host:/ S:  -o port=22 -o IdentityFile=D:/Users/user/.ssh/id_rsa 
-oVolumePrefix=/sshfs/user@host -o uid=-1,gid=-1,create_umask=007,mask=007  
-o FileSystemName=SSHFS  -o PasswordAuthentication=no -o StrictHostKeyChecking=no 
-o UserKnownHostsFile=/dev/null -o ServerAliveInterval=10  -o compression=no 
-o sshfs_sync -o rellinks  -o reconnect  -o ThreadCount=10 -o dir_cache=yes -o dcache_timeout=5 
-o dcache_clean_interval=300 -o KeepFileCache -o FileInfoTimeout=-1 -o DirInfoTimeout=5000 
-o VolumeInfoTimeout=5000 -f

I have the dump files if that is useful.
I am using the latest winfsp and sshfs.

Activity

  1. billziss-gh commented on Oct 2, 2018

    @billziss-gh
    Collaborator

    Can you please post the stackdump?

    We may have to compile a new SSHFS with the -g switch enabled and under gdb to track this down.

  2. sganis commented on Oct 2, 2018

    @sganis
    Author
  3. sganis commented on Oct 2, 2018

    @sganis
    Author

    It is also crashing when a folder is created from the command line like md s:\tmp\folder1.
    It happens in Windows 10, too.
    Creating and deleting files is ok, the problem is with folders.

  4. sganis commented on Oct 2, 2018

    @sganis
    Author

    Not sure if this helps but here we go.

    I noticed that the meson config file has the -g argument already.
    I just built it with messon && jinja as documented. Here is my gdb dump:

    $ gdb ./sshfs.exe
    Reading symbols from ./sshfs.exe...done.
    (gdb) run support@192.168.100.201:/ Z:  -o port=2222 -o IdentityFile=C:/Users/sant/.ssh/id_rsa-support-golddrive-o VolumePrefix=/sshfs/support@192.168.100.201 -o volname=support@192.168.100.201  -o uid=-1,gid=-1,create_umask=007,mask=007  -o FileSystemName=SSHFS  -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ServerAliveInterval=10  -o compression=no -o rellinks  -o reconnect -f
    Starting program: ...\sshfs-win\sshfs\build\sshfs.exe support@192.168.100.201:/ Z:  -o port=2222 -o IdentityFile=.../.ssh/id_rsa -o VolumePrefix=/sshfs/support@192.168.100.201 -o volname=support@192.168.100.201  -o uid=-1,gid=-1,create_umask=007,mask=007  -o FileSystemName=SSHFS  -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ServerAliveInterval=10  -o compression=no -o rellinks  -o reconnect -f
    [New Thread 2112.0xe34]
    warning: cYgFFFFFFFF 18022CDD0 0
    [New Thread 2112.0x74]
    [New Thread 2112.0xcb0]
    [New Thread 2112.0x664]
    warning: cYgstd 0xffffcb80 d 3
    [New Thread 2112.0x1260]
    [New Thread 2112.0x980]
    Warning: Permanently added '[192.168.100.201]:2222' (ECDSA) to the list of known hosts.
    [New Thread 2112.0x1128]
    [New Thread 2112.0x12e0]
    [New Thread 2112.0x47c]
    [New Thread 2112.0x1364]
    [New Thread 2112.0x1194]
    [New Thread 2112.0x5d8]
    [New Thread 2112.0x134c]
    The service sshfs has been started.
    [Thread 2112.0x5d8 exited with code 0]
    [New Thread 2112.0xab4]
    [New Thread 2112.0x5d4]
    
    Thread 11 received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 2112.0x1194]
    0x00000001800c2c57 in _memcpy () from C:\cygwin64\bin\cygwin1.dll
    (gdb) bt
    #0  0x00000001800c2c57 in _memcpy () from C:\cygwin64\bin\cygwin1.dll
    #1  0x0000000100405f9b in buf_add_buf (bufa=0x600089380, bufa=0x600089380,
        buf=0x2f3c800) at ../sshfs.c:616
    #2  sshfs_getattr (path=<optimized out>, stbuf=0x6000a0000,
        fi=<optimized out>) at ../sshfs.c:3175
    #3  0x0000000100409fde in cache_getattr (path=0x3dafa0 "/tmp/New folder (2)",
        stbuf=0x2f3c950, fi=0x2f3c8f0) at ../cache.c:272
    #4  0x000007fef8ab2e2c in winfsp-x64!fuse_set_signal_handlers ()
       from \\?\C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll
    #5  0x000007fef8ab5e3f in winfsp-x64!fuse_invalidate ()
       from \\?\C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll
    #6  0x000007fef8ab699c in winfsp-x64!fuse_invalidate ()
       from \\?\C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll
    #7  0x000007fef8ac2c4e in winfsp-x64!FspFileSystemOpLeave ()
       from \\?\C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll
    #8  0x000007fef8ac3b35 in winfsp-x64!FspFileSystemOpCreate ()
       from \\?\C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll
    #9  0x000007fef8ac6141 in winfsp-x64!FspFileSystemRemoveMountPoint ()
       from \\?\C:\Program Files (x86)\WinFsp\bin\winfsp-x64.dll
    #10 0x0000000180047973 in _cygtls::call2(unsigned int (*)(void*, void*), void*, void*) () from C:\cygwin64\bin\cygwin1.dll
    #11 0x0000000180047a24 in _cygtls::call(unsigned int (*)(void*, void*), void*)
        () from C:\cygwin64\bin\cygwin1.dll
    #12 0x0000000077a559cd in KERNEL32!BaseThreadInitThunk ()
       from C:\Windows\system32\kernel32.dll
    #13 0x0000000077cb385d in ntdll!RtlUserThreadStart ()
       from C:\Windows\SYSTEM32\ntdll.dll
    #14 0x0000000000000000 in ?? ()
    Backtrace stopped: previous frame inner to this frame (corrupt stack?)
    (gdb) q
    
  5. billziss-gh commented on Oct 2, 2018

    @billziss-gh
    Collaborator

    The stack trace is actually very helpful except that the WinFsp symbols look totally wrong. But if the Cygwin side of things is correct (cache_getattr and above) this may be helpful in pinpointing the problem.

  6. Sharky444 commented on Oct 21, 2018

    @Sharky444

    I've also experienced problems creating folders with V2.7 on Windows 10 Pro when mounting a volume on a webspace of the hoster netcup.de. Mounting the webspace as a volume and trying to create a folder using the new -> folder context menu has no effect at first. Windows does not ask for the folder name. Hitting refresh to update the content I see that 4 new folders have been created: New folder, New folder (2), New folder (3), New folder (4).

    The problem does not happen on my local linux server. I can create a folder using explorer just fine. Although sometimes explorer complains that the folder is already there, but creates it anyway.

  7. ajasja commented on Mar 14, 2019

    @ajasja

    I encountered the same on Win 10 and sshfs V 3.2.18213.
    image

    However 2.7 works nice.

  8. rmarder commented on Apr 28, 2019

    @rmarder

    I confirm this issue is still present in the recently released 3.5 beta.

    I'm using with Windows 10 x64 and WinFsp 2019.2 and the server is normal Ubuntu 18.04 with OpenSSH.
    Getting the identical screenshot results the same as ajasja posted before me.

    I can also confirm that sshfs-win-2.7.17334 does not have this problem.

  9. zhu-ty commented on May 14, 2019

    @zhu-ty

    I confirm this issue is still present in the recently released 3.5 beta.

    I'm using with Windows 10 x64 and WinFsp 2019.2 and the server is normal Ubuntu 18.04 with OpenSSH.
    Getting the identical screenshot results the same as ajasja posted before me.

    I can also confirm that sshfs-win-2.7.17334 does not have this problem.

    Same Problem, Need Help

  10. xnoreq commented on May 18, 2019

    @xnoreq

    Duplicate of #54

  11. CRTX commented on Jun 28, 2019

    @CRTX

    Downgrading to stable doesn't even fix this. I formatted windows using "Reset This PC" and also didn't work (I think it keeps some system files). The only thing that worked was deleting the partition and reinstalling windows from a USB stick. I think this only happens with the BETA version because I can create folders again in the stable version.

  12. billziss-gh commented on Jul 11, 2019

    @billziss-gh
    Collaborator

    Please try the latest version of WinFsp (2019.3 B2) and SSHFS-Win where I believe this problem has been fixed.

    I am closing this. Please reopen if you find that the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions