<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"\@等线";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:宋体;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:宋体;}
p.gmail-m3903278274190134145msolistparagraph, li.gmail-m3903278274190134145msolistparagraph, div.gmail-m3903278274190134145msolistparagraph
        {mso-style-name:gmail-m_3903278274190134145msolistparagraph;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:宋体;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:DengXian;
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:DengXian;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-CN" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">From our test valgrind and libleak all blame ssl3_accept<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">///////////////////////////from valgrind attached to glusterfds///////////////////////////////////////////<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">==16673== 198,720 bytes in 12 blocks are definitely lost in loss record 1,114 of 1,123<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;at 0x4C2EB7B: malloc (vg_replace_malloc.c:299)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0x63E1977: CRYPTO_malloc (in /usr/lib64/<u><span style="color:blue">libcrypto.so.1.0.2p</span></u>)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA855E0C: ssl3_setup_write_buffer (in /usr/lib64/<u><span style="color:blue">libssl.so.1.0.2p</span></u>)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA855E77: ssl3_setup_buffers (in /usr/lib64/<u><span style="color:blue">libssl.so.1.0.2p</span></u>)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA8485D9: <span style="color:red">ssl3_accept</span> (in /usr/lib64/<u><span style="color:blue">libssl.so.1.0.2p</span></u>)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA610DDF: ssl_complete_connection (socket.c:400)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA617F38: ssl_handle_server_connection_attempt (socket.c:2409)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA618420: socket_complete_connection (socket.c:2554)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA618788: socket_event_handler (socket.c:2613)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0x4ED6983: event_dispatch_epoll_handler (event-epoll.c:587)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0x4ED6C5A: event_dispatch_epoll_worker (event-epoll.c:663)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0x615C5D9: start_thread (in /usr/lib64/<u><span style="color:blue">libpthread-2.27.so</span></u>)<br>
==16673==<br>
==16673== 200,544 bytes in 12 blocks are definitely lost in loss record 1,115 of 1,123<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;at 0x4C2EB7B: malloc (vg_replace_malloc.c:299)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0x63E1977: CRYPTO_malloc (in /usr/lib64/<u><span style="color:blue">libcrypto.so.1.0.2p</span></u>)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA855D12: ssl3_setup_read_buffer (in /usr/lib64/<u><span style="color:blue">libssl.so.1.0.2p</span></u>)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA855E68: ssl3_setup_buffers (in /usr/lib64/<u><span style="color:blue">libssl.so.1.0.2p</span></u>)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA8485D9: <span style="color:red">ssl3_accept</span> (in /usr/lib64/<u><span style="color:blue">libssl.so.1.0.2p</span></u>)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA610DDF: ssl_complete_connection (socket.c:400)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA617F38: ssl_handle_server_connection_attempt (socket.c:2409)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA618420: socket_complete_connection (socket.c:2554)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0xA618788: socket_event_handler (socket.c:2613)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0x4ED6983: event_dispatch_epoll_handler (event-epoll.c:587)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0x4ED6C5A: event_dispatch_epoll_worker (event-epoll.c:663)<br>
==16673==&nbsp;&nbsp;&nbsp;&nbsp;by 0x615C5D9: start_thread (in /usr/lib64/<u><span style="color:blue">libpthread-2.27.so</span></u>)<br>
==16673==<br>
valgrind --leak-check=f<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">////////////////////////////////////with libleak attached to glusterfsd/////////////////////////////////////////<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">callstack[2419] expires. count=1 size=224/224 alloc=362 free=350<br>
&nbsp;&nbsp;&nbsp;&nbsp;/home/robot/libleak/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libleak.so(malloc&#43;0x25</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f1460604065]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libcrypto.so.10(CRYPTO_malloc&#43;0x58</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145ecd9978]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libcrypto.so.10(EVP_DigestInit_ex&#43;0x2a9</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145ed95749]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libssl.so.10(ssl3_digest_cached_records&#43;0x11d</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145abb6ced]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libssl.so.10(</span></u><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:red">ssl3_accept</span></u><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">&#43;0xc8f</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145abadc4f]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/usr/lib64/glusterfs/3.12.15/rpc-transport/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">socket.so(ssl_complete_connection&#43;0x5e</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145ae00f3a]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/usr/lib64/glusterfs/3.12.15/rpc-transport/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">socket.so(&#43;0xc16d</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145ae0816d]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/usr/lib64/glusterfs/3.12.15/rpc-transport/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">socket.so(&#43;0xc68a</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145ae0868a]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/usr/lib64/glusterfs/3.12.15/rpc-transport/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">socket.so(&#43;0xc9f2</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145ae089f2]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libglusterfs.so.0(&#43;0x9b96f</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f146038596f]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libglusterfs.so.0(&#43;0x9bc46</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f1460385c46]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libpthread.so.0(&#43;0x75da</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145f0d15da]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libc.so.6(clone&#43;0x3f</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145e9a7eaf]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">callstack[2432] expires. count=1 size=104/104 alloc=362 free=0<br>
&nbsp;&nbsp;&nbsp;&nbsp;/home/robot/libleak/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libleak.so(malloc&#43;0x25</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f1460604065]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libcrypto.so.10(CRYPTO_malloc&#43;0x58</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145ecd9978]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libcrypto.so.10(BN_MONT_CTX_new&#43;0x17</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145ed48627]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libcrypto.so.10(BN_MONT_CTX_set_locked&#43;0x6d</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145ed489fd]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libcrypto.so.10(&#43;0xff4d9</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145ed6a4d9]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libcrypto.so.10(int_rsa_verify&#43;0x1cd</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145ed6d41d]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libcrypto.so.10(RSA_verify&#43;0x32</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145ed6d972]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libcrypto.so.10(&#43;0x107ff5</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145ed72ff5]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libcrypto.so.10(EVP_VerifyFinal&#43;0x211</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145ed9dd51]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libssl.so.10(ssl3_get_cert_verify&#43;0x5bb</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145abac06b]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libssl.so.10(</span></u><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:red">ssl3_accept</span></u><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">&#43;0x988</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145abad948]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/usr/lib64/glusterfs/3.12.15/rpc-transport/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">socket.so(ssl_complete_connection&#43;0x5e</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145ae00f3a]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/usr/lib64/glusterfs/3.12.15/rpc-transport/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">socket.so(&#43;0xc16d</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145ae0816d]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/usr/lib64/glusterfs/3.12.15/rpc-transport/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">socket.so(&#43;0xc68a</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145ae0868a]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/usr/lib64/glusterfs/3.12.15/rpc-transport/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">socket.so(&#43;0xc9f2</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">)
 [0x7f145ae089f2]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libglusterfs.so.0(&#43;0x9b96f</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f146038596f]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libglusterfs.so.0(&#43;0x9bc46</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f1460385c46]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libpthread.so.0(&#43;0x75da</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145f0d15da]<br>
&nbsp;&nbsp;&nbsp;&nbsp;/lib64/</span><u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:blue">libc.so.6(clone&#43;0x3f</span></u><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Segoe UI&quot;,sans-serif;color:#1A1A1A">) [0x7f145e9a7eaf]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;font-family:DengXian">one interesting thing is that the memory goes up to about 300m then it stopped &nbsp;increasing !!!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;font-family:DengXian">I am wondering if this is caused by open-ssl library? But when I search from openssl community, there is no such issue reported before.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;font-family:DengXian">Is glusterfs using ssl_accept correctly?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">cynthia<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> Zhou, Cynthia (NSB - CN/Hangzhou)
<br>
<b>Sent:</b> Monday, May 06, 2019 10:34 AM<br>
<b>To:</b> 'Amar Tumballi Suryanarayan' &lt;atumball@redhat.com&gt;<br>
<b>Cc:</b> Milind Changire &lt;mchangir@redhat.com&gt;; gluster-devel@gluster.org<br>
<b>Subject:</b> RE: [Gluster-devel] glusterfsd memory leak issue found after enable ssl<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">Sorry, I am so busy with other issues these days, could you help me to submit my patch for review? It is based on glusterfs3.12.15 code. But even with this patch , memory
 leak still exists, from memory leak tool it should be related with ssl_accept, not sure if it is because of openssl library or because improper use of ssl interfaces.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">--- a/rpc/rpc-transport/socket/src/socket.c<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&#43;&#43; b/rpc/rpc-transport/socket/src/socket.c<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">@@ -1019,7 &#43;1019,16 @@ static void __socket_reset(rpc_transport_t *this) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;&nbsp; memset(&amp;priv-&gt;incoming, 0, sizeof(priv-&gt;incoming));<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;&nbsp;&nbsp;event_unregister_close(this-&gt;ctx-&gt;event_pool, priv-&gt;sock, priv-&gt;idx);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp; if(priv-&gt;use_ssl&amp;&amp; priv-&gt;ssl_ssl)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp; gf_log(this-&gt;name, GF_LOG_INFO,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;clear and reset for socket(%d), free ssl &quot;,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; priv-&gt;sock);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp; SSL_shutdown(priv-&gt;ssl_ssl);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp; SSL_clear(priv-&gt;ssl_ssl);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp; SSL_free(priv-&gt;ssl_ssl);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp; priv-&gt;ssl_ssl = NULL;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;&nbsp; priv-&gt;sock = -1;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;&nbsp; priv-&gt;idx = -1;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;&nbsp; priv-&gt;connected = -1;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">@@ -4238,6 &#43;4250,16 @@ void fini(rpc_transport_t *this) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;&nbsp;&nbsp;&nbsp; pthread_mutex_destroy(&amp;priv-&gt;out_lock);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;&nbsp;&nbsp;&nbsp; pthread_mutex_destroy(&amp;priv-&gt;cond_lock);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;&nbsp;&nbsp;&nbsp; pthread_cond_destroy(&amp;priv-&gt;cond);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp;&nbsp; if(priv-&gt;use_ssl&amp;&amp; priv-&gt;ssl_ssl)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp; gf_log(this-&gt;name, GF_LOG_INFO,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;clear and reset for socket(%d), free ssl &quot;,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; priv-&gt;sock);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp; SSL_shutdown(priv-&gt;ssl_ssl);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp; SSL_clear(priv-&gt;ssl_ssl);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp; SSL_free(priv-&gt;ssl_ssl);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp;&nbsp;&nbsp; priv-&gt;ssl_ssl = NULL;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&#43;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;&nbsp;&nbsp;&nbsp; if (priv-&gt;ssl_private_key) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; GF_FREE(priv-&gt;ssl_private_key);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> Amar Tumballi Suryanarayan &lt;<a href="mailto:atumball@redhat.com">atumball@redhat.com</a>&gt;
<br>
<b>Sent:</b> Wednesday, May 01, 2019 8:43 PM<br>
<b>To:</b> Zhou, Cynthia (NSB - CN/Hangzhou) &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com">cynthia.zhou@nokia-sbell.com</a>&gt;<br>
<b>Cc:</b> Milind Changire &lt;<a href="mailto:mchangir@redhat.com">mchangir@redhat.com</a>&gt;;
<a href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a><br>
<b>Subject:</b> Re: [Gluster-devel] glusterfsd memory leak issue found after enable ssl<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">Hi Cynthia Zhou,<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Can you post the patch which fixes the issue of missing free? We will continue to investigate the leak further, but would really appreciate getting the patch which is already worked on land into upstream master.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">-Amar<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">On Mon, Apr 22, 2019 at 1:38 PM Zhou, Cynthia (NSB - CN/Hangzhou) &lt;<a href="mailto:cynthia.zhou@nokia-sbell.com">cynthia.zhou@nokia-sbell.com</a>&gt; wrote:<o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">Ok, I am clear now.</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">I</span><span style="font-size:10.5pt;font-family:DengXian">’<span lang="EN-US">ve added ssl_free in socket reset
 and socket finish function, though glusterfsd memory leak is not that much, still it is leaking, from source code I can not find anything else,</span></span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">Could you help to check if this issue exists in your env? If not I may have a try to merge your patch .</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">Step</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="gmail-m3903278274190134145msolistparagraph" style="margin-left:18.0pt">
<span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">1&gt;</span><span lang="EN-US" style="font-size:7.0pt;font-family:&quot;Times New Roman&quot;,serif">&nbsp;&nbsp;
</span><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">while true;do gluster v heal &lt;vol-name&gt; info,</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="gmail-m3903278274190134145msolistparagraph" style="margin-left:18.0pt">
<span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">2&gt;</span><span lang="EN-US" style="font-size:7.0pt;font-family:&quot;Times New Roman&quot;,serif">&nbsp;&nbsp;
</span><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">check the vol-name glusterfsd memory usage, it is obviously increasing.</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">cynthia</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US" style="font-size:10.5pt;font-family:DengXian">&nbsp;</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> Milind
 Changire &lt;<a href="mailto:mchangir@redhat.com" target="_blank">mchangir@redhat.com</a>&gt;
<br>
<b>Sent:</b> Monday, April 22, 2019 2:36 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> 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</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">&nbsp;<o:p></o:p></span></p>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">According to BIO_new_socket() man page ...<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span lang="EN-US" style="background:#FFF2CC">If the close flag is set then the socket is shut down and closed when the BIO is freed.</span></b><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">&nbsp;<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">For Gluster to have more control over the socket shutdown, the BIO_NOCLOSE flag is set. Otherwise, SSL takes control of socket shutdown whenever BIO is freed.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">&nbsp;<o:p></o:p></span></p>
</div>
</div>
</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><o:p></o:p></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span lang="EN-US"><br clear="all">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-US">-- <o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Amar Tumballi (amarts)<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>