Bug 902218 - Probing an invalid host causes glusterd to crash
Summary: Probing an invalid host causes glusterd to crash
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: 2.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: krishnan parthasarathi
QA Contact: Sachidananda Urs
URL:
Whiteboard:
Depends On: 893851
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-21 07:37 UTC by Vidya Sakar
Modified: 2015-11-03 23:05 UTC (History)
9 users (show)

Fixed In Version: glusterfs-3.4.0qa8
Doc Type: Bug Fix
Doc Text:
Clone Of: 893851
Environment:
Last Closed: 2013-09-23 22:39:25 UTC
Embargoed:


Attachments (Terms of Use)

Description Vidya Sakar 2013-01-21 07:37:35 UTC
+++ This bug was initially created as a clone of Bug #893851 +++

This is causing regression tests to fail most of the time at step 12 of bug-879490.t and is also readily reproducible in isolation.  The problem is that we're adding the new peer to our peer list *after* calling glusterd_friend_rpc_create.  Unfortunately, by that time the disconnect-notify callback associated with our new  RPC object might already have been invoked, removing *and freeing* the new peer.  Thus, we add it after freeing it, leading to a corrupt list and a likely future crash - most often in glusterd_op_ac_send_lock while deleting the volume.  The test fails because glusterd disconnects and dies in mid-operation.

The fix is to change the order of addition to and deletion from the peer list.  In the process, the general control flow of glusterd_friend_add was simplified so that it's not only correct but more readily verified to be so.

--- Additional comment from Jeff Darcy on 2013-01-09 22:36:32 EST ---

http://review.gluster.org/#change,4372

--- Additional comment from Vijay Bellur on 2013-01-10 04:29:59 EST ---

CHANGE: http://review.gluster.org/4372 (glusterd: fix memory corruption when probe fails) merged in master by Vijay Bellur (vbellur)

Comment 2 Amar Tumballi 2013-02-01 06:20:33 UTC
valid only for rhs-2.1.0... is now committed.

Comment 4 Scott Haines 2013-04-11 16:36:30 UTC
Per 04-10-2013 Storage bug triage meeting, targeting for Big Bend.

Comment 5 Sachidananda Urs 2013-08-01 07:21:43 UTC
Verified on: glusterfs 3.4.0.14rhs built on Jul 30 2013 09:09:36

Crash is not seen.

Comment 6 Scott Haines 2013-09-23 22:39:25 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. 

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1262.html

Comment 7 Scott Haines 2013-09-23 22:43:44 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. 

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1262.html


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