1) I've got an external USB HDD at /dev/da1 with NTFS partition on /dev/da1p2 Mount it: # ntfs-3g /dev/da1p2 /mnt/seagate 2) Let one of its directories be accessible from jail myjail: # mount -t nullfs /mnt/seagate/Blockchain/Bitcoin /usr/local/jails/myjail/blockchain 3) In jail: execute: bitcoin-qt --datadir=/blockchain - OK. Close bitcoin-qt. Execute again - ntfs-3g crashed on host. It's a null pointer dereference. I've attached the core file. gdb says: Core was generated by `ntfs-3g /dev/da1p2 /mnt/seagate/'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00000008002727f5 in get_dirhandle (llfi=0x7fffffffe6a0, fi=0x7fffffffe630) at fuse.c:3374 3374 fi->fh = dh->fh;
I can't upload core dump here (413 Request Entity Too Large) so I've used sendspace.com ntfs-3g.core.tgz -> https://www.sendspace.com/file/6ry071
gdb says: Core was generated by `ntfs-3g /dev/da1p2 /mnt/seagate/'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00000008002727f5 in get_dirhandle (llfi=0x7fffffffe6a0, fi=0x7fffffffe630) at fuse.c:3374 3374 fi->fh = dh->fh; (gdb) where #0 0x00000008002727f5 in get_dirhandle (llfi=0x7fffffffe6a0, fi=0x7fffffffe630) at fuse.c:3374 #1 0x000000080026df02 in fuse_lib_fsyncdir (req=0x80073d440, ino=11, datasync=0, llfi=0x7fffffffe6a0) at fuse.c:3615 #2 0x000000080027a53d in do_fsyncdir (req=0x80073d440, nodeid=11, inarg=0x801f01668) at fuse_lowlevel.c:1421 #3 0x0000000800277e66 in fuse_ll_process_buf (data=0x801e80380, buf=0x7fffffffe908, ch=0x800744040) at fuse_lowlevel.c:2443 #4 0x000000080027cf8d in fuse_session_process_buf (se=0x8007e0050, buf=0x7fffffffe908, ch=0x800744040) at fuse_session.c:87 #5 0x0000000800273f84 in fuse_session_loop (se=0x8007e0050) at fuse_loop.c:40 #6 0x00000008002694d2 in fuse_loop (f=0x801e87140) at fuse.c:4386 #7 0x0000000000205db5 in main (argc=3, argv=0x7fffffffebc0) at ntfs-3g.c:4306
Take a guess at which port this PR is about and Cc: accordingly.
Just found out, nullfs is not required for this bug. Mounted this way (from host): # ntfs-3g /dev/da1p2 /usr/local/jails/myjail/mnt/sea # ln -s /usr/local/jails/myjail/mnt/sea/Blockchains/Bitcoin /usr/local/jails/myjail/blockchain Executed bitcoin-qt several times and got the same crash. Blockchains/Bitcoin is a full synchronized blockchain (> 200 GiB) Thank you for your help
Which version of FreeBSD and sysutils/fusefs-ntfs are you using? I checked fuse.c at libfuse-lite/fuse.c of this port but it has only 3248 lines.