Red Hat Bugzilla – Bug 902218
Probing an invalid host causes glusterd to crash
Last modified: 2015-11-03 18:05:03 EST
+++ 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 ---
--- 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 (firstname.lastname@example.org)
valid only for rhs-2.1.0... is now committed.
Per 04-10-2013 Storage bug triage meeting, targeting for Big Bend.
Verified on: glusterfs 126.96.36.199rhs built on Jul 30 2013 09:09:36
Crash is not seen.
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.