phatina / simple-mtpfs

Simple MTP fuse filesystem driver.
GNU General Public License v2.0
371 stars 45 forks source link

Crash in fuse_fs_ioctl #82

Open mcepl opened 3 years ago

mcepl commented 3 years ago

When running my simple synchronization script over the directories mounted by simple-mtpfs I get this backtrace:

Thread 1 "simple-mtpfs" received signal SIGSEGV, Segmentation fault.
0x00007ffff7f7d82d in fuse_fs_ioctl (fs=<optimized out>, path=0x555555587900 "/Karta SD/Knihy/fanfiction/After the Die is Cast-mgln_30857.epub", cmd=21505, arg=0x7ffddc4e7c80,
    fi=0x7fffffffd050, flags=0, data=0x0) at fuse.c:2371
Downloading source file /usr/src/debug/fuse-2.9.9-4.1.x86_64/lib/fuse.c...
2371            return fs->op.ioctl(path, cmd, arg, fi, flags, data);
(gdb) t a a bt

Thread 2 (Thread 0x7ffff783c640 (LWP 22066) "libusb_event"):
#0  0x00007ffff7c1e8cf in __GI___poll (fds=fds@entry=0x7ffff783be20, nfds=nfds@entry=2, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff7f60009 in poll (__timeout=<optimized out>, __nfds=<optimized out>, __fds=<optimized out>, __fds=<optimized out>, __nfds=<optimized out>, __timeout=<optimized out>) at /usr/include/bits/poll2.h:46
#2  linux_udev_event_thread_main (arg=<optimized out>) at os/linux_udev.c:183
#3  0x00007ffff7b073e9 in start_thread (arg=0x7ffff783c640) at pthread_create.c:463
#4  0x00007ffff7c299c3 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7ffff783fb80 (LWP 22065) "simple-mtpfs"):
#0  0x00007ffff7f7d82d in fuse_fs_ioctl (fs=<optimized out>, path=0x555555587900 "/Karta SD/Knihy/fanfiction/After the Die is Cast-mgln_30857.epub", cmd=21505, arg=0x7ffddc4e7c80, fi=0x7fffffffd050, flags=0, data=0x0) at fuse.c:2371
#1  0x00007ffff7f87284 in fuse_lib_ioctl (req=0x5555555998d0, ino=5, cmd=21505, arg=0x7ffddc4e7c80, llfi=<optimized out>, flags=0, in_buf=0x0, in_bufsz=0, out_bufsz=0) at fuse.c:4103
#2  0x00007ffff7f835f1 in do_ioctl (req=<optimized out>, nodeid=<optimized out>, inarg=<optimized out>) at fuse_lowlevel.c:1681
#3  0x00007ffff7f8e5e9 in fuse_ll_process_buf (data=0x55555559afc0, buf=0x7fffffffd2f0, ch=<optimized out>) at fuse_lowlevel.c:2443
#4  0x00007ffff7f7f44f in fuse_session_loop (se=0x5555555b6d60) at fuse_loop.c:40
#5  0x00007ffff7f8f8e7 in fuse_main_common (argc=<optimized out>, argv=<optimized out>, op=op@entry=0x555555583318, op_size=op_size@entry=360, user_data=user_data@entry=0x0, compat=compat@entry=0) at helper.c:371
#6  0x00007ffff7f8f948 in fuse_main_real (argc=<optimized out>, argv=<optimized out>, op=op@entry=0x555555583318, op_size=op_size@entry=360, user_data=user_data@entry=0x0) at helper.c:383
#7  0x000055555555a38a in SMTPFileSystem::exec (this=0x555555583300) at simple-mtpfs-fuse.cpp:392
#8  main (argc=<optimized out>, argv=<optimized out>) at simple-mtpfs-main.cpp:46
(gdb)

Using openSUSE/Tumbleweed, simple-mtpfs 0.4.0, libmtp9-1.1.18-1.1.x86_64, libfuse2-2.9.9-4.1.x86_64.