glusterd: Handle rpc_connect failure in the event handler
authorVijaikumar M <vmallika@redhat.com>
Fri, 23 May 2014 09:12:08 +0000 (14:42 +0530)
committerRaghavendra G <rgowdapp@redhat.com>
Thu, 5 Jun 2014 17:11:45 +0000 (10:11 -0700)
commit42b956971c47fd0708cbbd17ce8c78c2ed79bfba
treec8056e730ff7277a6a323aad85ac8874862e4099
parenta89e35727e3a9a7226c7a16479935b7109b11663
glusterd: Handle rpc_connect failure in the event handler

Currently rpc_connect calls the notification function on failure in the
same thread, glusterd notification holds the big_lock and
hence big_lock is released before rpc_connect

In snapshot creation, releasing the big-lock before completeing
operation can cause problem like deadlock or memory corruption.

Bricks are started as part of snapshot created operation.
brick_start releases the big_lock when doing brick_connect and this
might cause glusterd crash.
There is a similar issue in bug# 1088355.

Solution is let the event handler handle the failure than doing it in
the rpc_connect.

Change-Id: I088d44092ce845a07516c1d67abd02b220e08b38
BUG: 1101507
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/7843
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
rpc/rpc-lib/src/rpc-clnt.c
rpc/rpc-transport/socket/src/Makefile.am
rpc/rpc-transport/socket/src/socket-mem-types.h [new file with mode: 0644]
rpc/rpc-transport/socket/src/socket.c
xlators/mgmt/glusterd/src/glusterd-handler.c
xlators/mgmt/glusterd/src/glusterd-rebalance.c
xlators/mgmt/glusterd/src/glusterd-snapshot.c
xlators/mgmt/glusterd/src/glusterd-utils.c