Seg fault in FUSE code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Seg fault in FUSE code

David Sorber
Hello all,

I've recently inherited a rather large FUSE file system and I've been working on making some improvements to it.  Things are going fairly well but I've got one test case that fails consistently.

The test untars a gzipped tarball containing approximately 1330 XML files.  I generally get about 270 files in before I get a segfault in FUSE itself.  The failure does not always happen on the same tarball file but seems to be fairly consistent. Using a "JIT debug" trick (custom signal handler that attaches gdb to the process when it catches a SIGSEGV signal) I was able to capture the following two traces, both from distinct failures:

Thread 2 (Thread 0x7f2bf93d6700 (LWP 3622)):
#0  0x00007f2bffb4adfd in nanosleep () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f2bffb4ac94 in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:137
#2  0x00007f2c016786e6 in gdb (sig=11) at jitdbg.c:34
#3  <signal handler called>
#4  get_node_nocheck (f=0x1a45840, nodeid=nodeid@entry=221) at fuse.c:538
#5  0x00007f2bff124589 in get_node (f=<optimized out>, nodeid=221) at fuse.c:546
#6  0x00007f2bff1245df in unlock_path (f=f@entry=0x1a45840, nodeid=nodeid@entry=221, wnode=wnode@entry=0x0, end=end@entry=0x0) at fuse.c:960
#7  0x00007f2bff124d30 in free_path_wrlock (f=f@entry=0x1a45840, nodeid=nodeid@entry=221, wnode=wnode@entry=0x0, path=0x7f2be80530a0 "/regression/twitter/data/20150721/1437508802.json.txml") at fuse.c:1297
#8  0x00007f2bff1268fd in free_path (path=<optimized out>, nodeid=221, f=0x1a45840) at fuse.c:1307
#9  fuse_lib_lookup (req=0x7f2be80144c0, parent=221, name=<optimized out>) at fuse.c:2713
#10 0x00007f2bff1313db in fuse_ll_process_buf (data=0x192a700, buf=0x7f2bf93d5e80, ch=<optimized out>) at fuse_lowlevel.c:2442
#11 0x00007f2bff12dff9 in fuse_do_work (data=0x7f2bd8001610) at fuse_loop_mt.c:117
#12 0x00007f2c00371184 in start_thread (arg=0x7f2bf93d6700) at pthread_create.c:312
#13 0x00007f2bffb8437d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111


Thread 2 (Thread 0x7fad0b7fe700 (LWP 5164)):
#0  0x00007fad162a7dfd in nanosleep () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fad162a7c94 in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:137
#2  0x00007fad17dd56e6 in gdb (sig=11) at jitdbg.c:34
#3  <signal handler called>
#4  get_node_nocheck (f=0x2036660, nodeid=nodeid@entry=493) at fuse.c:538
#5  0x00007fad15881589 in get_node (f=<optimized out>, nodeid=493) at fuse.c:546
#6  0x00007fad15884e34 in fuse_lib_open (req=0x7facfc055830, ino=493, fi=0x7fad0b7fdcd0) at fuse.c:3264
#7  0x00007fad1588ecac in do_open (req=<optimized out>, nodeid=<optimized out>, inarg=<optimized out>) at fuse_lowlevel.c:1214
#8  0x00007fad1588e3db in fuse_ll_process_buf (data=0x2043c40, buf=0x7fad0b7fde80, ch=<optimized out>) at fuse_lowlevel.c:2442
#9  0x00007fad1588aff9 in fuse_do_work (data=0x7facf4001450) at fuse_loop_mt.c:117
#10 0x00007fad16ace184 in start_thread (arg=0x7fad0b7fe700) at pthread_create.c:312
#11 0x00007fad162e137d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

The segfault appears to be happening in both cases inside get_node_nocheck.  Given that this is happening inside FUSE itself I'm having trouble figuring out how to approach debugging it.  Any suggestions or pointers would be greatly appreciated.

I'm using FUSE 2.9.4 on Ubuntu 14.04.3 (kernel 3.19).  I tried upgrading to 2.9.6 for grins, but I got the very same failures.

Thanks,
-David

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
--
fuse-devel mailing list
To unsubscribe or subscribe, visit https://lists.sourceforge.net/lists/listinfo/fuse-devel