<div dir="ltr">On Mon, Apr 22, 2019 at 8:32 AM Zhou, Cynthia (NSB - CN/Hangzhou) &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com">cynthia.zhou@nokia-sbell.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="ZH-CN">
<div class="gmail-m_5519917115889022005WordSection1">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">Thanks for your quick responding!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">My test env is without patch 22334, so priv-&gt;ssl_ctx is shared one. In socket_reset there is no need to free it. but if with patch 22334, it is absolutely needed to free priv-&gt;ssl_ctx
 as well.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">Following is the log captured from glusterfsd side while connection establishment, when accept returns, a new  new_trans is allocated, and the socket_init input param is this
 new_trans, because this new_trans has no option now, so in socket_init   ssl_setup_connection_params is not called, so there should be no malloc done here, as showed from following log, ssl_setup_connection_params is called in socket_event_handler, and here
 the ssl_ctx had been assigned to the shared one.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">This issue is very easy to reproduce in my env, just “while true; do gluster v heal &lt;vol-name&gt; info;done” and check the memory of the corresponding glusterfsd , it is very
 obvious increase.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"><u></u></span></p></div></div></blockquote><div>for pre-22334 code ssl_ctx free need not be done <br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="ZH-CN"><div class="gmail-m_5519917115889022005WordSection1"><p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">One more thing to confirm is that there is no need to free the ssl_sbio right? Ssl_free will handle it and just call ssl_free is enough?</span></b></p></div></div></blockquote><div>You need to call <span style="font-family:monospace,monospace">BIO_free()</span></div><div>Check <span style="font-family:monospace,monospace">man bio</span>.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="ZH-CN"><div class="gmail-m_5519917115889022005WordSection1"><p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"><u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.820346] T [socket.c:2776:socket_server_event_handler] 0-tcp.ccs-server: XXX server:<a href="http://192.168.1.13:53952" target="_blank">192.168.1.13:53952</a>, client:<a href="http://192.168.1.13:63683" target="_blank">192.168.1.13:63683</a><u></u><u></u></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.820370] T [socket.c:2820:socket_server_event_handler] 0-tcp.ccs-server: ### use non-blocking IO<u></u><u></u></span></b></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.820410] T [socket.c:2603:socket_event_handler] 0-tcp.ccs-server: server (sock:126) in:1, out:0, err:0<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.820431] T [socket.c:2610:socket_event_handler] 0-tcp.ccs-server: server (sock:126) socket is not connected, completing connection<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.820442] T [socket.c:3829:<b>ssl_setup_connection_params</b>] 0-tcp.ccs-server:
<b>found old SSL context!   // context is shared between listening socket and accepted socket</b><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.820451] T [socket.c:310:ssl_setup_connection_prefix] 0-tcp.ccs-server: + ssl_setup_connection_params() done!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.822559] T [socket.c:2617:socket_event_handler] 0-tcp.ccs-server: (sock:126) socket_complete_connection() returned 1<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.822585] T [socket.c:2621:socket_event_handler] 0-tcp.ccs-server: (sock:126) returning to wait on socket<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.828455] T [socket.c:2603:socket_event_handler] 0-tcp.ccs-server: server (sock:126) in:1, out:0, err:0<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.828483] T [socket.c:2610:socket_event_handler] 0-tcp.ccs-server: server (sock:126) socket is not connected, completing connection<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.829130] D [socket.c:366:ssl_setup_connection_postfix] 0-tcp.ccs-server: peer CN = example ee certificate<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.829157] D [socket.c:369:ssl_setup_connection_postfix] 0-tcp.ccs-server: SSL verification succeeded (client: <a href="http://192.168.1.13:63683" target="_blank">192.168.1.13:63683</a>) (server: <a href="http://192.168.1.13:53952" target="_blank">192.168.1.13:53952</a>)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.829171] T [socket.c:423:ssl_complete_connection] 0-tcp.ccs-server: ssl_accepted!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.829183] T [socket.c:2617:socket_event_handler] 0-tcp.ccs-server: (sock:126) socket_complete_connection() returned 1<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.829192] T [socket.c:2621:socket_event_handler] 0-tcp.ccs-server: (sock:126) returning to wait on socket<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.829261] T [socket.c:2603:socket_event_handler] 0-tcp.ccs-server: server (sock:126) in:1, out:0, err:0<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.829282] T [socket.c:2628:socket_event_handler] 0-tcp.ccs-server: Server socket (126) is already connected<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.829294] T [socket.c:493:__socket_ssl_readv] 0-tcp.ccs-server: ***** reading over SSL<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.829311] T [socket.c:493:__socket_ssl_readv] 0-tcp.ccs-server: ***** reading over SSL<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">[2019-04-21 05:02:17.829337] T [socket.c:493:__socket_ssl_readv] 0-tcp.ccs-server: ***** reading over SSL<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">cynthia<u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif" lang="EN-US">From:</span></b><span style="font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif" lang="EN-US"> Milind Changire &lt;<a href="mailto:mchangir@redhat.com" target="_blank">mchangir@redhat.com</a>&gt;
<br>
<b>Sent:</b> Monday, April 22, 2019 10:21 AM<br>
<b>To:</b> Zhou, Cynthia (NSB - CN/Hangzhou) &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt;<br>
<b>Cc:</b> Atin Mukherjee &lt;<a href="mailto:amukherj@redhat.com" target="_blank">amukherj@redhat.com</a>&gt;; <a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a><br>
<b>Subject:</b> Re: [Gluster-devel] glusterfsd memory leak issue found after enable ssl<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">After patch <a href="https://review.gluster.org/c/glusterfs/+/22334" target="_blank">
22334</a>, the </span><span style="font-family:&quot;Courier New&quot;" lang="EN-US">priv-&gt;ssl_ctx</span><span lang="EN-US"> is now maintained per socket connection and is no longer shared.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">So you might want to </span><span style="font-family:&quot;Courier New&quot;" lang="EN-US">SSL_free(priv-&gt;ssl_ctx)</span><span lang="EN-US"> as well and set
</span><span style="font-family:&quot;Courier New&quot;" lang="EN-US">priv-&gt;ssl_ctx</span><span lang="EN-US"> to
</span><span style="font-family:&quot;Courier New&quot;" lang="EN-US">NULL</span><span lang="EN-US">.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">There might be some strings that are duplicated (</span><span style="font-family:&quot;Courier New&quot;" lang="EN-US">gf_strdup()</span><span lang="EN-US">) via the
</span><span style="font-family:&quot;Courier New&quot;" lang="EN-US">socket_init()</span><span lang="EN-US"> code path. Please take a look at those as well.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Sorry about that. I missed it.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">On Mon, Apr 22, 2019 at 7:25 AM Zhou, Cynthia (NSB - CN/Hangzhou) &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt; wrote:<u></u><u></u></span></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">Hi,</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">From my code study it seems priv-&gt;ssl_ssl is not properly released, I made a patch and the glusterfsd memory leak
 is alleviated with my patch, but some otherwhere is still leaking, I have no clue about the other leak points.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">--- a/rpc/rpc-transport/socket/src/socket.c</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+++ b/rpc/rpc-transport/socket/src/socket.c</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">@@ -1019,7 +1019,16 @@ static void __socket_reset(rpc_transport_t *this) {</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">   memset(&amp;priv-&gt;incoming, 0, sizeof(priv-&gt;incoming));</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">   event_unregister_close(this-&gt;ctx-&gt;event_pool, priv-&gt;sock, priv-&gt;idx);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">-</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+  if(priv-&gt;use_ssl&amp;&amp; priv-&gt;ssl_ssl)</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+  {</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+    gf_log(this-&gt;name, GF_LOG_TRACE,</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+           &quot;clear and reset for socket(%d), free ssl &quot;,</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+           priv-&gt;sock);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+    SSL_shutdown(priv-&gt;ssl_ssl);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+    SSL_clear(priv-&gt;ssl_ssl);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+    SSL_free(priv-&gt;ssl_ssl);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+    priv-&gt;ssl_ssl = NULL;</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+  }</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">   priv-&gt;sock = -1;</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">   priv-&gt;idx = -1;</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">   priv-&gt;connected = -1;</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">@@ -4238,6 +4250,16 @@ void fini(rpc_transport_t *this) {</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">     pthread_mutex_destroy(&amp;priv-&gt;out_lock);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">     pthread_mutex_destroy(&amp;priv-&gt;cond_lock);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">     pthread_cond_destroy(&amp;priv-&gt;cond);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+     if(priv-&gt;use_ssl&amp;&amp; priv-&gt;ssl_ssl)</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+  {</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+    gf_log(this-&gt;name, GF_LOG_TRACE,</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+           &quot;clear and reset for socket(%d), free ssl &quot;,</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+           priv-&gt;sock);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+    SSL_shutdown(priv-&gt;ssl_ssl);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+    SSL_clear(priv-&gt;ssl_ssl);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+    SSL_free(priv-&gt;ssl_ssl);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+    priv-&gt;ssl_ssl = NULL;</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">+  }</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">     if (priv-&gt;ssl_private_key) {</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">       GF_FREE(priv-&gt;ssl_private_key);</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">     }</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<div>
<div style="border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm;border-color:currentcolor">
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif" lang="EN-US">From:</span></b><span style="font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif" lang="EN-US"> Zhou,
 Cynthia (NSB - CN/Hangzhou) <br>
<b>Sent:</b> Thursday, April 18, 2019 5:31 PM<br>
<b>To:</b> &#39;Atin Mukherjee&#39; &lt;<a href="mailto:amukherj@redhat.com" target="_blank">amukherj@redhat.com</a>&gt;<br>
<b>Cc:</b> &#39;Raghavendra Gowdappa&#39; &lt;<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>&gt;; &#39;<a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a>&#39; &lt;<a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a>&gt;<br>
<b>Subject:</b> RE: [Gluster-devel] glusterfsd memory leak issue found after enable ssl</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">We scan it use memory-leak tool, there are following prints. We doubt some open ssl lib malloc is is not properly
 freed by glusterfs code.</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">er+0x2af [</span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">libglusterfs.so.0.0.1]\n\t\tstart_thread+0xda</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">
 [</span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US"><a href="http://libpthread-2.27.so" target="_blank">libpthread-2.27.so</a></span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">]&#39;<br>
        </span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">13580</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US"> bytes in 175 allocations from stack<br>
                b&#39;CRYPTO_malloc+0x58 [</span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">libcrypto.so.1.0.2p</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">]&#39;<br>
        </span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">232904</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US"> bytes in 14 allocations from stack<br>
                b&#39;CRYPTO_malloc+0x58 [</span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">libcrypto.so.1.0.2p]\n\t\t[unknown</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">]&#39;<br>
[15:41:56] Top 10 stacks with outstanding allocations:<br>
        </span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">8792</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US"> bytes in 14 allocations from stack<br>
                b&#39;CRYPTO_malloc+0x58 [</span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">libcrypto.so.1.0.2p]\n\t\t[unknown</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">]&#39;<br>
        </span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">9408</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US"> bytes in 42 allocations from stack<br>
                b&#39;CRYPTO_realloc+0x4d [</span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">libcrypto.so.1.0.2p</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">]&#39;<br>
        </span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">9723</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US"> bytes in 14 allocations from stack<br>
                b&#39;CRYPTO_malloc+0x58 [</span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">libcrypto.so.1.0.2p]\n\t\t[unknown</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">]&#39;<br>
        </span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">10696</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US"> bytes in 21 allocations from stack<br>
                b&#39;CRYPTO_malloc+0x58 [</span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">libcrypto.so.1.0.2p]\n\t\t[unknown</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">]&#39;<br>
        </span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">11319</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US"> bytes in 602 allocations from stack<br>
                b&#39;CRYPTO_malloc+0x58 [</span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">libcrypto.so.1.0.2p]\n\t\t[unknown</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">]&#39;<br>
        </span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">11431</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US"> bytes in 518 allocations from stack<br>
                b&#39;CRYPTO_malloc+0x58 [</span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">libcrypto.so.1.0.2p]\n\t\t[unknown</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">]&#39;<br>
        </span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">11704</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US"> bytes in 371 allocations from stack<br>
                b&#39;CRYPTO_malloc+0x58 [</span><u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue" lang="EN-US">libcrypto.so.1.0.2p]\n\t\t[unknown</span></u><span style="font-size:10pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:rgb(26,26,26)" lang="EN-US">]&#39;</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">cynthia</span><span lang="EN-US"><u></u><u></u></span></p>
<div>
<div style="border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm;border-color:currentcolor">
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif" lang="EN-US">From:</span></b><span style="font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif" lang="EN-US"> Zhou,
 Cynthia (NSB - CN/Hangzhou) <br>
<b>Sent:</b> Thursday, April 18, 2019 5:25 PM<br>
<b>To:</b> &#39;Atin Mukherjee&#39; &lt;<a href="mailto:amukherj@redhat.com" target="_blank">amukherj@redhat.com</a>&gt;<br>
<b>Cc:</b> Raghavendra Gowdappa &lt;<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>&gt;;
<a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a><br>
<b>Subject:</b> RE: [Gluster-devel] glusterfsd memory leak issue found after enable ssl</span><span lang="EN-US"><u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">I</span><span style="font-size:10.5pt;font-family:DengXian">’<span lang="EN-US">ve test on glusterfs3.12.15 and
 glusterfs5.5 all have this issue, after enable tls ssl socket, when execute gluster v heal &lt;vol-name&gt; info, will trigger glfshel to connect glusterfsd process, and cause glusterfsd process memory leak. Could you please try in your env?
</span></span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US">cynthia</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:DengXian" lang="EN-US"> </span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif" lang="EN-US">From:</span></b><span style="font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif" lang="EN-US"> Atin
 Mukherjee &lt;<a href="mailto:amukherj@redhat.com" target="_blank">amukherj@redhat.com</a>&gt;
<br>
<b>Sent:</b> Thursday, April 18, 2019 1:19 PM<br>
<b>To:</b> Zhou, Cynthia (NSB - CN/Hangzhou) &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt;<br>
<b>Cc:</b> Raghavendra Gowdappa &lt;<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@redhat.com</a>&gt;;
<a href="mailto:gluster-devel@gluster.org" target="_blank">gluster-devel@gluster.org</a><br>
<b>Subject:</b> Re: [Gluster-devel] glusterfsd memory leak issue found after enable ssl</span><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">On Wed, 17 Apr 2019 at 10:53, Zhou, Cynthia (NSB - CN/Hangzhou) &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com" target="_blank">cynthia.zhou@nokia-sbell.com</a>&gt;
 wrote:<u></u><u></u></span></p>
</div>
<blockquote style="border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt;border-color:currentcolor currentcolor currentcolor rgb(204,204,204)">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">In my recent test, I found that there are very severe glusterfsd memory leak when enable socket ssl option<u></u><u></u></span></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">What gluster version are you testing? Would you be able to continue your investigation and share the root cause? <u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US">--
<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">- Atin (atinm)<u></u><u></u></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US">_______________________________________________<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank">Gluster-devel@gluster.org</a><br>
<a href="https://lists.gluster.org/mailman/listinfo/gluster-devel" target="_blank">https://lists.gluster.org/mailman/listinfo/gluster-devel</a><u></u><u></u></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span lang="EN-US"><br clear="all">
<br>
-- <u></u><u></u></span></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt"><span lang="EN-US">Milind<u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Milind<br><br></div></div></div></div></div>