Hide Forgot
(gdb) fr 7 #7 0xfec9b9c3 in posix_readdir (frame=0x8ce2998, this=0x80b0b48, fd=0x8e2c988, size=4096, off=293844269) at posix.c:3524 (gdb) p/o fd->inode->st_mode $4 = 0100664 That is the mode of a file (gdb) p *pfd $5 = {fd = 19, flags = 1, path = 0x0, dir = 0x0} The pfd structure shows that it is a filedescriptor of a file (dir and path are NULL) fr 7 shows that a readdir has happened on a file
PATCH: http://patches.gluster.com/patch/862 in master (add check for making sure 'fd' belongs to directory in posix-readdir)
PATCH: http://patches.gluster.com/patch/861 in release-2.0 (add check for making sure 'fd' belongs to directory in posix-readdir)
below is the backtrace Program terminated with signal 11, Segmentation fault. #0 0xfedaa0b7 in _lwp_kill () from /lib/libc.so.1 (gdb) bt #0 0xfedaa0b7 in _lwp_kill () from /lib/libc.so.1 #1 0xfeda5814 in thr_kill () from /lib/libc.so.1 #2 0xfed51df3 in raise () from /lib/libc.so.1 #3 0xfee631f2 in gf_print_trace (signum=11) at common-utils.c:424 #4 0xfeda742f in __sighndlr () from /lib/libc.so.1 #5 0xfed9d141 in call_user_handler () from /lib/libc.so.1 #6 <signal handler called> #7 0xfec9b9c3 in posix_readdir (frame=0x8ce2998, this=0x80b0b48, fd=0x8e2c988, size=4096, off=293844269) at posix.c:3524 #8 0xfee6233c in default_readdir (frame=0x89976d8, this=0x80b1828, fd=0x8e2c988, size=4096, off=293844269) at defaults.c:1400 #9 0xfec55220 in iot_readdir_wrapper (frame=0x857e918, this=0x80b18c0, fd=0x8e2c988, size=4096, offset=293844269) at io-threads.c:1689 #10 0xfee6d6c7 in call_resume (stub=0x8686e00) at call-stub.c:2661 #11 0xfec555d5 in iot_worker_ordered (arg=0x80b1e60) at io-threads.c:1943 #12 0xfeda7045 in _thr_setup () from /lib/libc.so.1 #13 0xfeda7330 in L3_doit () from /lib/libc.so.1 #14 0xfecc1200 in ?? () #15 0x00000000 in ?? () ---- It looks like the segfault happened due to readdir call on a file's 'fd'.
this is a duplicate of the bug-173. can you mention the process you followed to produce this crash?
PATCH: http://patches.gluster.com/patch/943 in master (protocol/client: fixed registration of saved_fds)
PATCH: http://patches.gluster.com/patch/943 in release-2.0 (protocol/client: fixed registration of saved_fds)
*** This bug has been marked as a duplicate of bug 126 ***