From 42b956971c47fd0708cbbd17ce8c78c2ed79bfba Mon Sep 17 00:00:00 2001 From: Vijaikumar M Date: Fri, 23 May 2014 14:42:08 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/7843 Reviewed-by: Krishnan Parthasarathi Reviewed-by: Jeff Darcy Tested-by: Gluster Build System Reviewed-by: Raghavendra G Tested-by: Raghavendra G --- rpc/rpc-lib/src/rpc-clnt.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'rpc/rpc-lib/src') diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 44324a80431..8a460cfa617 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -429,10 +429,6 @@ rpc_clnt_reconnect (void *conn_ptr) } pthread_mutex_unlock (&conn->lock); - if ((ret == -1) && (errno != EINPROGRESS) && (clnt->notifyfn)) { - clnt->notifyfn (clnt, clnt->mydata, RPC_CLNT_DISCONNECT, NULL); - } - return; } -- cgit