Bug 1420434

Summary: Trash feature improperly disabled
Product: [Community] GlusterFS Reporter: Jeff Darcy <jdarcy>
Component: trash-xlatorAssignee: Jeff Darcy <jdarcy>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.11.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1420808 (view as bug list) Environment:
Last Closed: 2017-03-09 20:32:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1417815, 1420808, 1436697    

Description Jeff Darcy 2017-02-08 15:57:09 UTC
In the course of multiplexing development, it was found that the trash translator would crash if more than one instance was present in a single brick process.  Accordingly, trash was disabled so other work could continue.  The crashes look like this.

#0  0x00007f1740887ee2 in trash_dir_lookup_cbk (frame=0x7f16f017a5d0, 
    cookie=0x7f16f017b190, this=0x7f171c002320, op_ret=-1, op_errno=2, 
    inode=0x0, buf=0x7f1706ffb300, xdata=0x0, postparent=0x7f1706ffb290)
    at trash.c:680
#1  0x00007f17410b68ee in posix_lookup (frame=0x7f16f017b190, 
    this=0x7f171c001020, loc=0x7f1706ffb480, xdata=0x0) at posix.c:257
#2  0x00007f1740888723 in create_or_rename_trash_directory (
    this=0x7f171c002320) at trash.c:750
#3  0x00007f1740897561 in reconfigure (this=0x7f171c002320, 
    options=0x7f16f015e080) at trash.c:2286

The problem is that the order of reconfigure vs. notify(CHILD_UP) is different with multiplexing, and only the notify path was allocating priv->trash_itable.  Moving that to the translator's init seems to fix the problem, so trash can be reenabled.  Patch as soon as I have the bug number.

Comment 1 Worker Ant 2017-02-08 15:57:38 UTC
REVIEW: https://review.gluster.org/16567 (trash: fix problem with trash feature under multiplexing) posted (#1) for review on master by Jeff Darcy (jdarcy)

Comment 2 Worker Ant 2017-02-09 13:46:49 UTC
COMMIT: https://review.gluster.org/16567 committed in master by Shyamsundar Ranganathan (srangana) 
------
commit 1e4f9c58a1b013f3f27d515d72d1e76e1a53436e
Author: Jeff Darcy <jdarcy>
Date:   Wed Feb 8 10:48:55 2017 -0500

    trash: fix problem with trash feature under multiplexing
    
    With multiplexing, the trash translator gets a reconfigure call before
    a notify(CHILD_UP).  In this case, priv->trash_itable was not yet
    initialized, so the reconfigure would get a SEGV.  Moving the itable
    allocation to init seems to fix it, so trash can be reenabled.
    
    Change-Id: I21ac2d7fc66bac1bc4ec70fbc8bae306d73ac565
    BUG: 1420434
    Signed-off-by: Jeff Darcy <jdarcy>
    Reviewed-on: https://review.gluster.org/16567
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Anoop C S <anoopcs>
    Reviewed-by: jiffin tony Thottan <jthottan>
    Reviewed-by: Shyamsundar Ranganathan <srangana>

Comment 3 Worker Ant 2017-02-09 14:55:59 UTC
REVIEW: https://review.gluster.org/16584 (tests: reenable trash.t) posted (#1) for review on master by Jeff Darcy (jdarcy)

Comment 4 Worker Ant 2017-02-10 13:17:03 UTC
COMMIT: https://review.gluster.org/16584 committed in master by Jeff Darcy (jdarcy) 
------
commit e02c418ebf2b25cbefc3de83b6fc84215e5917b7
Author: Jeff Darcy <jdarcy>
Date:   Thu Feb 9 09:53:51 2017 -0500

    tests: reenable trash.t
    
    Now that the underlying bug has been fixed (by d97e63d0) we can allow
    the test to run again.
    
    Change-Id: If9736d142f414bf9af5481659c2b2673ec797a4b
    BUG: 1420434
    Signed-off-by: Jeff Darcy <jdarcy>
    Reviewed-on: https://review.gluster.org/16584
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Anoop C S <anoopcs>
    Reviewed-by: jiffin tony Thottan <jthottan>

Comment 5 Shyamsundar 2017-05-30 18:41:34 UTC
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.11.0, please open a new bug report.

glusterfs-3.11.0 has been announced on the Gluster mailinglists [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://lists.gluster.org/pipermail/announce/2017-May/000073.html
[2] https://www.gluster.org/pipermail/gluster-users/