[Bugs] [Bug 1481600] New: rpc: client_t and related objects leaked due to incorrect ref counts
bugzilla at redhat.com
bugzilla at redhat.com
Tue Aug 15 07:13:59 UTC 2017
https://bugzilla.redhat.com/show_bug.cgi?id=1481600
Bug ID: 1481600
Summary: rpc: client_t and related objects leaked due to
incorrect ref counts
Product: GlusterFS
Version: mainline
Component: rpc
Assignee: bugs at gluster.org
Reporter: mchangir at redhat.com
CC: bugs at gluster.org
Description of problem:
Problem:
1. asymmetrical ref counting
First call to gf_client_get() creates a new client_t object and sets the bind
count and the ref count to 1. Additional gf_client_get() just increments the
bind
count but not the ref count. This is causing confusion as to when should the
ref
count be decremented on a gf_client_put(), since currently gf_client_put() only
decrements the bind count
2. missing unref on some handshake and glusterfs program actors
server_submit_reply() on following actors is called with frame pointer as NULL
Handshake actors:
GETSPEC:
can't add ref on this request since client obj hasn't been created when
this
request hits the server; so this is good; no unref required either;
The tests, however, request a the spec by an explicit
'gluster system getspec' command after a SETVOLUME. So there would be a ref
that needs to be accounted for.
SETVOLUME:
does gf_client_get() which inits bind count and ref count to 1; this is
good
case;
SET_LK_VER:
Actually the actor function does a gf_client_get() as well as a
gf_client_put(). But the problem is rpcsvc_request_create() path adds a ref
to the client_t on receiving this request but fails to drop the ref in
server_submit_reply() since the frame pointer passed is NULL.
PING:
rpcsvc_request_init() adds a ref but can't unref the request since frame is
NULL in server_submit_reply()
Glusterfs actors:
RELEASE:
rpcsvc_request_init() adds a ref but can't unref the request since frame is
NULL in server_submit_reply()
RELEASE_DIR:
rpcsvc_request_init() adds a ref but can't unref the request since frame is
NULL in server_submit_reply()
NULL:
rpcsvc_request_init() adds a ref but can't unref the request since frame is
NULL in server_submit_reply()
Version-Release number of selected component (if applicable):
How reproducible:
always (with valgrind)
--
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