Bug 1345855

Summary: Possible crash due to a timer cancellation race
Product: [Community] GlusterFS Reporter: Xavi Hernandez <jahernan>
Component: disperseAssignee: Xavi Hernandez <jahernan>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.9.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1346156 1346158 (view as bug list) Environment:
Last Closed: 2016-11-23 07:20:11 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: 1346156, 1346158    

Description Xavi Hernandez 2016-06-13 10:37:23 UTC
Description of problem:

Incorrect management of timers failed to be cancelled could lead to crashes when the timer callback is executed and some resources have already been released by the cancelling thread.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Vijay Bellur 2016-06-13 10:47:26 UTC
REVIEW: http://review.gluster.org/14712 (cluster/ec: Fix race in timer cancellation) posted (#1) for review on master by Xavier Hernandez (xhernandez)

Comment 2 Vijay Bellur 2016-06-13 10:49:57 UTC
REVIEW: http://review.gluster.org/14712 (cluster/ec: Fix race in timer cancellation) posted (#2) for review on master by Xavier Hernandez (xhernandez)

Comment 3 Vijay Bellur 2016-06-13 11:40:39 UTC
REVIEW: http://review.gluster.org/14712 (cluster/ec: Fix race in timer cancellation) posted (#3) for review on master by Xavier Hernandez (xhernandez)

Comment 4 Vijay Bellur 2016-06-14 01:03:24 UTC
COMMIT: http://review.gluster.org/14712 committed in master by Pranith Kumar Karampuri (pkarampu) 
------
commit fb013a9db2cc019d36b07644f24e6c15ed39725c
Author: Xavier Hernandez <xhernandez>
Date:   Mon Jun 13 12:42:47 2016 +0200

    cluster/ec: Fix race in timer cancellation
    
    A race in timer cancellation for delayed unlock could cause a crash
    if the cancelling thread fails to cancel the timer because it has
    already been fired but not executed, and the callback is scheduled
    out of the CPU, delaying it until the thread has released important
    resources needed by the callback.
    
    This patch improves the handling of this case to make it robust.
    
    Change-Id: I5c8a8c6610c5136f71b938aa78b5878ba05238d4
    BUG: 1345855
    Signed-off-by: Xavier Hernandez <xhernandez>
    Reviewed-on: http://review.gluster.org/14712
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>