Bug 893851 - Probing an invalid host causes glusterd to crash
Probing an invalid host causes glusterd to crash
Product: GlusterFS
Classification: Community
Component: glusterd (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: krishnan parthasarathi
: 889382 (view as bug list)
Depends On:
Blocks: 895528 902218
  Show dependency treegraph
Reported: 2013-01-09 22:01 EST by Jeff Darcy
Modified: 2015-12-01 11:45 EST (History)
3 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 902218 (view as bug list)
Last Closed: 2013-07-24 13:52:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jeff Darcy 2013-01-09 22:01:15 EST
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-09 22:36:32 EST
Comment 2 Vijay Bellur 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@redhat.com)
Comment 3 Jeff Darcy 2013-01-22 07:29:46 EST
*** 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.