[Gluster-devel] Segfault at cache read_dir
Dongmin Yu
min at hostway.co.kr
Tue Nov 24 12:00:26 UTC 2009
Hello,
To isolate the issue, I created a simple test case.
void readdir_test()
{
struct dirent *dirp = NULL;
glusterfs_dir_t dirfd = NULL;
char *path = "/hs2/m/min001";
dirfd = glusterfs_opendir( path );
while( (dirp = glusterfs_readdir(dirfd)) != NULL ) {
printf("%s\n", dirp->d_name );
}
glusterfs_closedir( dirfd );
}
I'm using CentOS 64bit. The configuration was not the issue.
This test works fine with 2.0.7 but does endless loop with 2.0.8 client.
Thanks
DongMin Yu
HOSTWAY IDC Corp. / R&D Principal Researcher
TEL. +822 2105 6037
FAX. +822 2105 6019
CELL. +8216 2086 1357
EMAIL: min.yu at hostwaycorp.com
Website: http://www.hostway.com
NOTICE: This email and any file transmitted are confidential and/or
legally privileged and intended only for the person(s) directly
addressed. If you are not the intended recipient, any use, copying,
transmission, distribution, or other forms of dissemination is strictly
prohibited. If you have received this email in error, please notify the
sender immediately and permanently delete the email and files, if any.
From: gluster-devel-bounces+min=hostway.co.kr at nongnu.org
[mailto:gluster-devel-bounces+min=hostway.co.kr at nongnu.org] On Behalf Of
Dongmin Yu
Sent: Tuesday, November 24, 2009 8:01 PM
To: gluster-devel at nongnu.org
Subject: [Gluster-devel] Segfault at cache read_dir
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
DongMin Yu
HOSTWAY IDC Corp. / R&D Principal Researcher
TEL. +822 2105 6037
FAX. +822 2105 6019
CELL. +8216 2086 1357
EMAIL: min.yu at hostwaycorp.com
Website: http://www.hostway.com
NOTICE: This email and any file transmitted are confidential and/or
legally privileged and intended only for the person(s) directly
addressed. If you are not the intended recipient, any use, copying,
transmission, distribution, or other forms of dissemination is strictly
prohibited. If you have received this email in error, please notify the
sender immediately and permanently delete the email and files, if any.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20091124/e017f5c6/attachment-0003.html>
More information about the Gluster-devel
mailing list