Bug 893851 - Probing an invalid host causes glusterd to crash
Summary: Probing an invalid host causes glusterd to crash
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: krishnan parthasarathi
QA Contact:
URL:
Whiteboard:
: 889382 (view as bug list)
Depends On:
Blocks: 895528 902218
TreeView+ depends on / blocked
 
Reported: 2013-01-10 03:01 UTC by Jeff Darcy
Modified: 2015-12-01 16:45 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 902218 (view as bug list)
Environment:
Last Closed: 2013-07-24 17:52:17 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Jeff Darcy 2013-01-10 03:01:15 UTC
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.

Comment 1 Jeff Darcy 2013-01-10 03:36:32 UTC
http://review.gluster.org/#change,4372

Comment 2 Vijay Bellur 2013-01-10 09:29:59 UTC
CHANGE: http://review.gluster.org/4372 (glusterd: fix memory corruption when probe fails) merged in master by Vijay Bellur (vbellur)

Comment 3 Jeff Darcy 2013-01-22 12:29:46 UTC
*** Bug 889382 has been marked as a duplicate of this bug. ***


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