[Bugs] [Bug 1242734] GlusterD crashes when management encryption is enabled

bugzilla at redhat.com bugzilla at redhat.com
Tue Jul 14 10:25:47 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1242734



--- Comment #2 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/11655 committed in release-3.7 by Krishnan
Parthasarathi (kparthas at redhat.com) 
------
commit 11253616203ce450b49f25df2a0f4fec0a974b41
Author: Kaushal M <kaushal at redhat.com>
Date:   Mon Jul 13 16:16:00 2015 +0530

    rpc-transport: socket_poller fixes for proper working of mgmt encryption

      Backport of 8c39f14 from master

    socket_poller, the polling function used by ssl own_thread, had two
    issues which lead to GlusterD crashes when using management encryption

    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.

    To fix this, THIS is being set at the start of socket_poller
    unconditionally.

    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.

    To fix this, DISCONNECT notification in socket_poller is sent on the
    client socket, as it is done in the epoll handler.

    Change-Id: I0370b7c6d7eb13de10ebf08d91a4a39dc7d64c7a
    BUG: 1242734
    Signed-off-by: Kaushal M <kaushal at redhat.com>
    Reviewed-on: http://review.gluster.org/11655
    Tested-by: NetBSD Build System <jenkins at build.gluster.org>
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Krishnan Parthasarathi <kparthas at redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list