From 24b95089a18a6a40e7703cb344e92025d67f3086 Mon Sep 17 00:00:00 2001 From: Milind Changire Date: Wed, 30 Aug 2017 11:25:29 +0530 Subject: rpc: destroy transport after client_t Problem: 1. Ref counting increment on the client_t object is done in rpcsvc_request_init() which is incorrect. 2. Ref not taken when delegating to grace_time_handler() Solution: 1. Only fop requests which require processing down the graph via stack 'frames' now ref count the request in get_frame_from_request() 2. Take ref on client_t object in server_rpc_notify() but avoid dropping in RPCSVC_EVENT_TRANSPORT_DESRTROY. Drop the ref unconditionally when exiting out of grace_time_handler(). Also, avoid dropping ref on client_t in RPCSVC_EVENT_TRANSPORT_DESTROY when ref mangement as been delegated to grace_time_handler() Change-Id: Ic16246bebc7ea4490545b26564658f4b081675e4 BUG: 1481600 Reported-by: Raghavendra G Signed-off-by: Milind Changire Reviewed-on: https://review.gluster.org/17982 Tested-by: Raghavendra G Reviewed-by: Raghavendra G CentOS-regression: Gluster Build System Smoke: Gluster Build System --- rpc/rpc-lib/src/rpcsvc.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'rpc') diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index e05e65d3b95..68e27ab9e3f 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -411,9 +411,6 @@ rpcsvc_request_init (rpcsvc_t *svc, rpc_transport_t *trans, req->progver = rpc_call_progver (callmsg); req->procnum = rpc_call_progproc (callmsg); req->trans = rpc_transport_ref (trans); - if (req->trans->xl_private) { - gf_client_ref (req->trans->xl_private); - } req->count = msg->count; req->msg[0] = progmsg; req->iobref = iobref_ref (msg->iobref); -- cgit