Bug 994959 - AFR: readdirp hangs on failure
AFR: readdirp hangs on failure
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: replicate (Show other bugs)
mainline
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Pranith Kumar K
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-08 06:00 EDT by Pranith Kumar K
Modified: 2014-04-17 07:45 EDT (History)
4 users (show)

See Also:
Fixed In Version: glusterfs-3.5.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 994956
Environment:
Last Closed: 2014-04-17 07:45:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Pranith Kumar K 2013-08-08 06:08:27 EDT
Tests:

Breakpoint 1, afr_readdirp_cbk (frame=0x7fd31394b2fc, cookie=0x0, this=0x93db40, op_ret=3, op_errno=2, 
    entries=0x7fff5dae7be0, xdata=0x0) at afr-dir-read.c:425
425	        afr_local_t     *local = NULL;
(gdb) p op_ret=-1 //simulate a failure.
$1 = -1
(gdb) n
427	        if (op_ret == -1)
(gdb) 
428	                goto out;
(gdb) 
434	        AFR_STACK_UNWIND (readdirp, frame, op_ret, op_errno, entries, NULL);
(gdb) 
435	        return 0;
(gdb) c
Continuing.

Breakpoint 1, afr_readdirp_cbk (frame=0x7fd31394be68, cookie=0x0, this=0x93db40, op_ret=3, op_errno=2, 
    entries=0x7fff5dae7be0, xdata=0x0) at afr-dir-read.c:425
425	        afr_local_t     *local = NULL;
(gdb) n
427	        if (op_ret == -1)
(gdb) 
430	        local = frame->local;
(gdb) 
431	        afr_readdir_filter_trash_dir (entries, local->fd);
(gdb) 
434	        AFR_STACK_UNWIND (readdirp, frame, op_ret, op_errno, entries, NULL);
(gdb) 
435	        return 0;
(gdb) c
Continuing.

Breakpoint 1, afr_readdirp_cbk (frame=0x7fd31394be68, cookie=0x0, this=0x93db40, op_ret=0, op_errno=2, 
    entries=0x7fff5dae7be0, xdata=0x0) at afr-dir-read.c:425
425	        afr_local_t     *local = NULL;
(gdb) n
427	        if (op_ret == -1)
(gdb) 
430	        local = frame->local;
(gdb) 
431	        afr_readdir_filter_trash_dir (entries, local->fd);
(gdb) 
434	        AFR_STACK_UNWIND (readdirp, frame, op_ret, op_errno, entries, NULL);
(gdb) 
435	        return 0;
(gdb) c
Continuing.

Breakpoint 2, afr_readdir_cbk (frame=0x7f2937ab704c, cookie=0x1, this=0x180cb40, op_ret=3, op_errno=2, 
    entries=0x7fff9d42c180, xdata=0x0) at afr-dir-read.c:406
406	        afr_local_t     *local = NULL;
(gdb) p op_ret=-1 //simulate failure
$5 = -1
(gdb) n
408	        if (op_ret == -1)
(gdb) 
409	                goto out;
(gdb) 
415	        AFR_STACK_UNWIND (readdir, frame, op_ret, op_errno, entries, NULL);
(gdb) 
416	        return 0;
(gdb) c
Continuing.
[Switching to Thread 0x7f292e4fa700 (LWP 17257)]

Breakpoint 1, afr_do_readdir (frame=0x7f2937ab704c, this=0x180cb40, fd=0x187abcc, size=4096, offset=0, 
    whichop=40, dict=0x7f29374b2998) at afr-dir-read.c:442
442	        afr_private_t *priv      = NULL;
(gdb) p whichop=GF_FOP_READDIR
$6 = 28
(gdb) c
Continuing.
[Switching to Thread 0x7f293ed4a740 (LWP 17249)]

Breakpoint 2, afr_readdir_cbk (frame=0x7f2937ab704c, cookie=0x1, this=0x180cb40, op_ret=3, op_errno=2, 
    entries=0x7fff9d42c180, xdata=0x0) at afr-dir-read.c:406
406	        afr_local_t     *local = NULL;
(gdb) c
Continuing.
[Switching to Thread 0x7f292e4fa700 (LWP 17257)]

Breakpoint 1, afr_do_readdir (frame=0x7f2937ab704c, this=0x180cb40, fd=0x187abcc, size=4096, offset=512, 
    whichop=40, dict=0x7f29374b2998) at afr-dir-read.c:442
442	        afr_private_t *priv      = NULL;
(gdb) p whichop=GF_FOP_READDIR
$7 = 28
(gdb) c
Continuing.
[Switching to Thread 0x7f293ed4a740 (LWP 17249)]

Breakpoint 2, afr_readdir_cbk (frame=0x7f2937ab704c, cookie=0x1, this=0x180cb40, op_ret=0, op_errno=2, 
    entries=0x7fff9d42c180, xdata=0x0) at afr-dir-read.c:406
406	        afr_local_t     *local = NULL;
(gdb) n
408	        if (op_ret == -1)
(gdb) 
411	        local = frame->local;
(gdb) 
412	        afr_readdir_filter_trash_dir (entries, local->fd);
(gdb) 
415	        AFR_STACK_UNWIND (readdir, frame, op_ret, op_errno, entries, NULL);
(gdb) 
416	        return 0;
(gdb) c
Continuing.
Comment 2 Anand Avati 2013-08-08 06:10:05 EDT
REVIEW: http://review.gluster.org/5531 (cluster/afr: Unwind frame on error in readdir[p]) posted (#1) for review on master by Pranith Kumar Karampuri (pkarampu@redhat.com)
Comment 3 Anand Avati 2013-08-09 00:05:44 EDT
COMMIT: http://review.gluster.org/5531 committed in master by Anand Avati (avati@redhat.com) 
------
commit ff38e3e0289439dd9e4521567bf1bfa9d184b5ef
Author: Pranith Kumar K <pkarampu@redhat.com>
Date:   Thu Aug 8 15:22:10 2013 +0530

    cluster/afr: Unwind frame on error in readdir[p]
    
    Change-Id: I5701bf115e0aa1adb4fb52f5418534910a2268d4
    BUG: 994959
    Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
    Reviewed-on: http://review.gluster.org/5531
    Reviewed-by: Vijay Bellur <vbellur@redhat.com>
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
Comment 4 Niels de Vos 2014-04-17 07:45:37 EDT
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.5.0, please reopen this bug report.

glusterfs-3.5.0 has been announced on the Gluster Developers mailinglist [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Note You need to log in before you can comment on or make changes to this bug.