From 7140858c3816c89d22d81ddfaa1d270db5dfd622 Mon Sep 17 00:00:00 2001 From: Prashanth Pai Date: Fri, 21 Jul 2017 15:48:23 +0530 Subject: rpc: prevent logging null client [Invalid argument] The following log entry is observed during volume operations such as volume create: [2017-07-20 05:13:43.213797] E [client_t.c:321:gf_client_ref] (-->/usr/local/lib/libgfrpc.so.0(rpcsvc_request_create+0x1a4) [0x7f987f66cd20] -->/usr/local/lib/libgfrpc.so.0(rpcsvc_request_init+0xd0) [0x7f987f66ca23] -->/usr/local/lib/libglusterfs.so.0(gf_client_ref+0x56) [0x7f987f91cbd5] ) 0-client_t: null client [Invalid argument] Change-Id: I49ba753e8d1a828bb275b0ccb1a181706774f387 BUG: 1193929 Signed-off-by: Prashanth Pai Reviewed-on: https://review.gluster.org/17848 Reviewed-by: Raghavendra G Reviewed-by: Amar Tumballi Tested-by: Amar Tumballi Smoke: Gluster Build System CentOS-regression: Gluster Build System --- rpc/rpc-lib/src/rpcsvc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rpc/rpc-lib/src/rpcsvc.c') diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index fa44bb84e16..e05e65d3b95 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -411,7 +411,9 @@ 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); - gf_client_ref (req->trans->xl_private); + 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