Bug 1243768

Summary: GlusterD crashes when management encryption is enabled
Product: [Community] GlusterFS Reporter: Vijay Bellur <vbellur>
Component: rpcAssignee: bugs <bugs>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.6.4CC: bugs, gluster-bugs, kaushal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1242570 Environment:
Last Closed: 2015-07-16 10:00:36 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: 1242570    
Bug Blocks: 1242367, 1242734, 1243700    

Description Vijay Bellur 2015-07-16 09:29:04 UTC
+++ This bug was initially created as a clone of Bug #1242570 +++

Two issues in socket_poller, the polling function used by SSL own-thread, caused GlusterD to crash when management encryption is enabled.

Issue 1
-------
socket_poller calls functions which require THIS to be set. But, THIS
was being set conditionally. Because of this, functions could sometimes
be called without THIS being set. For example, rpc_transport_notify
could be called for an accepted client socket without THIS being set, as
THIS was only set it the transport wasn't yet connected. This would
cause the process to crash when THIS was accessed by the called
functions.

Issue 2
-------
DISCONNECT notify was being sent on the listener transport instead of
the client transport. The DISCONNECT event was converted to a
LISTENER_DEAD event in rpcsvc_handle_disconnect, as it could not find
the listener socket of the listener socket. GlusterD was notified of a
LISTENER_DEAD event instead of a DISCONNECT and failed to remove the
client transport from its xprt_list. The transport would subsequently
be freed, leaving the xprt_list with a corrupted/invalid entry. Later,
when GlusterD would iterate over the xprt_list to send notifications, it
would crash when the invalid entry was accessed.

Comment 1 Vijay Bellur 2015-07-16 10:00:36 UTC

*** This bug has been marked as a duplicate of bug 1241785 ***