<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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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:DengXian;
        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;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:DengXian;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:DengXian;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:DengXian;}
/* Page Definitions */
@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="#0563C1" vlink="#954F72" style="text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi glusterfs expert,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I meet glusterfs process coredump again in my env, short after glusterfs process startup. The local become NULL, but seems this frame is not destroyed yet since the magic number(GF_MEM_HEADER_MAGIC) still untouched.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">Using host libthread_db library &quot;/lib64/libthread_db.so.1&quot;.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">Core was generated by `/usr/sbin/glusterfs --acl --volfile-server=mn-0.local --volfile-server=mn-1.loc'.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">Program terminated with signal SIGSEGV, Segmentation fault.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">#0&nbsp; 0x00007f867fcd2971 in client3_3_inodelk_cbk (req=&lt;optimized out&gt;, iov=&lt;optimized out&gt;, count=&lt;optimized out&gt;, myframe=0x7f8654008830)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">&nbsp;&nbsp;&nbsp; at client-rpc-fops.c:1510<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">1510&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CLIENT_STACK_UNWIND (inodelk, frame, rsp.op_ret,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">[Current thread is 1 (Thread 0x7f867d6d4700 (LWP 3046))]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">Missing separate debuginfos, use: dnf debuginfo-install glusterfs-fuse-3.12.15-1.wos2.wf29.x86_64<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">(gdb) bt<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">#0&nbsp; 0x00007f867fcd2971 in client3_3_inodelk_cbk (req=&lt;optimized out&gt;, iov=&lt;optimized out&gt;, count=&lt;optimized out&gt;, myframe=<b><span style="color:red">0x7f8654008830</span></b>)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">&nbsp;&nbsp;&nbsp; at client-rpc-fops.c:1510<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">#1&nbsp; 0x00007f8685ea5584 in rpc_clnt_handle_reply (clnt=clnt@entry=0x7f8678070030, pollin=pollin@entry=0x7f86702833e0) at rpc-clnt.c:782<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">#2&nbsp; 0x00007f8685ea587b in rpc_clnt_notify (trans=&lt;optimized out&gt;, mydata=0x7f8678070060, event=&lt;optimized out&gt;, data=0x7f86702833e0) at rpc-clnt.c:975<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">#3&nbsp; 0x00007f8685ea1b83 in rpc_transport_notify (this=this@entry=0x7f8678070270, event=event@entry=RPC_TRANSPORT_MSG_RECEIVED,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">&nbsp;&nbsp;&nbsp;&nbsp;data=data@entry=0x7f86702833e0) at rpc-transport.c:538<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">#4&nbsp; 0x00007f8680b99867 in socket_event_poll_in (notify_handled=_gf_true, this=0x7f8678070270) at socket.c:2260<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">#5&nbsp; socket_event_handler (fd=&lt;optimized out&gt;, idx=3, gen=1, data=0x7f8678070270, poll_in=&lt;optimized out&gt;, poll_out=&lt;optimized out&gt;,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">&nbsp;&nbsp;&nbsp;&nbsp;poll_err=&lt;optimized out&gt;) at socket.c:2645<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">#6&nbsp; 0x00007f8686132911 in event_dispatch_epoll_handler (event=0x7f867d6d3e6c, event_pool=0x55e1b2792b00) at event-epoll.c:583<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">#7&nbsp; event_dispatch_epoll_worker (data=0x7f867805ece0) at event-epoll.c:659<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">#8&nbsp; 0x00007f8684ea65da in start_thread () from /lib64/libpthread.so.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">#9&nbsp; 0x00007f868474eeaf in clone () from /lib64/libc.so.6<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">(gdb) print *(call_frame_t*)myframe<o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:7.5pt">$3 = {root = 0x7f86540271a0, parent = 0x0, frames = {next = 0x7f8654027898, prev = 0x7f8654027898}, local = 0x0, this = 0x7f8678013080, ret = 0x0,
<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:7.5pt">&nbsp;&nbsp;ref_count = 0, lock = {spinlock = 0, mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0,
<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:7.5pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__list = {__prev = 0x0, __next = 0x0}}, __size = '\000' &lt;repeats 39 times&gt;, __align = 0}}, cookie = 0x0, complete = _gf_false,<span style="color:red"> xid = 0</span>,
<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:7.5pt">&nbsp;&nbsp;op = GF_FOP_NULL, begin = {tv_sec = 0, tv_usec = 0}, end = {tv_sec = 0, tv_usec = 0}, wind_from = 0x0, wind_to = 0x0, unwind_from = 0x0, unwind_to = 0x0}<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">(gdb) x/4xw&nbsp; <b><span style="color:red">0x7f8654008810</span></b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">0x7f8654008810:&nbsp;&nbsp;
<b><span style="color:red">0xcafebabe</span></b> 0x00000000 0x00000000 0x00000000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">(gdb) p *(pooled_obj_hdr_t *)<b><span style="color:red">0x7f8654008810</span></b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt">$2 = {magic = 3405691582, next = 0x0, pool_list = 0x7f8654000b80, power_of_two = 8}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:7.5pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I add &#8220;uint32_t xid&#8221; in data structure _call_frame, and set it according to the rcpreq-&gt;xid in __save_frame function. In normal situation this xid should only be 0 immediately after create_frame from memory pool. But
 in this case this xid is 0, so <b>seems like that the frame has been given out for use before freed</b>. Have you any idea how this happen?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">cynthia<o:p></o:p></span></p>
</div>
</body>
</html>