Hello
I’m using GlusterFS-2.0.8 and I turn on readahead. I got a Segfault when
I try to read a directory.
At the following trace, fd_ctx->dcache seems to be NULL
volume readahead
type performance/read-ahead
option page-count 4 # 2 is default option
option force-atime-update off # default is off
subvolumes distribute
end-volume
Program received signal SIGSEGV, Segmentation fault.
0x00002aaab4b03606 in libgf_dcache_readdir (ctx=<value optimized out>,
fd=<value optimized out>, dirp=0x2aaab31cd7f8, offset=0x4f9d2248)
at libglusterfsclient.c:398
398 *offset = fd_ctx->dcache->next->d_off;
(gdb) bt
#0 0x00002aaab4b03606 in libgf_dcache_readdir (ctx=<value optimized out>,
fd=<value optimized out>, dirp=0x2aaab31cd7f8, offset=0x4f9d2248)
at libglusterfsclient.c:398
#1 0x00002aaab4b100d9 in libgf_client_readdir (ctx=0x2aaab31cd80b,
fd=0x2aaab48e0928, dirp=0x0, offset=0x0) at libglusterfsclient.c:4151
#2 0x00002aaab4b1047f in glusterfs_readdir (dirfd=0x2aaab319b310)
at libglusterfsclient.c:4253
#3 0x00002aaab48e7e38 in gluster_readdir (self=<value optimized out>,
args=0x2aaab4824840) at glusterfs.c:1035
(gdb) p fd_ctx->dcache->next->d_off
Cannot access memory at address 0xb8
(gdb) p fd_ctx
$1 = (libglusterfs_client_fd_ctx_t *) 0x2aaab31cd7c0
(gdb) p fd_ctx->dcache
$2 = (struct direntcache *) 0x0