<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=iso-2022-jp">
<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:游ゴシック;
        panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:"\@游ゴシック";
        panose-1:2 11 4 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0mm;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:游ゴシック;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.17
        {mso-style-type:personal-compose;
        font-family:游ゴシック;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:游ゴシック;}
/* Page Definitions */
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:99.25pt 30.0mm 30.0mm 30.0mm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026">
<v:textbox inset="5.85pt,.7pt,5.85pt,.7pt" />
</o:shapedefaults></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="JA" link="#0563C1" vlink="#954F72" style="word-wrap:break-word;text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Hi, Pgpool hackers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">In Pgpool-II4.2.7, process down due to segmentation fault occurs.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">The OS is RHEL8 and PostgreSQL 13.2.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">When I got the backtrace from core, it was as follows.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">(gdb) bt<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#0 0x0000559ff3b977f4 in function_call_walker (node=0x1000100000000, context=0x7ffcefcf1390) at utils/pool_select_walker.c:341<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#1 0x0000559ff3b9458d in raw_expression_tree_walker (node=0x559ff531aa10, walker=0x559ff3b977e0 <function_call_walker>, context=0x7ffcefcf1390) at rewrite/pool_timestamp.c:1454<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#2 0x0000559ff3b9446d in raw_expression_tree_walker (node=0x559ff53147c8, walker=0x559ff3b977e0 <function_call_walker>, context=0x7ffcefcf1390) at rewrite/pool_timestamp.c:1518<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#3 0x0000559ff3b9646c in pool_has_function_call (node=node@entry=0x559ff53147c8) at utils/pool_select_walker.c:73<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#4 0x0000559ff3b7bb6c in Execute (frontend=frontend@entry=0x559ff52dbb78, backend=backend@entry=0x7f545af010e8, len=9, contents=contents@entry=0x559ff52e1b98 "C_60") at protocol/pool_proto_modules.c:1077<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#5 0x0000559ff3b8205e in ProcessFrontendResponse (frontend=frontend@entry=0x559ff52dbb78, backend=backend@entry=0x7f545af010e8) at protocol/pool_proto_modules.c:2708<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#6 0x0000559ff3b739e3 in read_packets_and_process (frontend=<optimized out>, backend=<optimized out>, reset_request=<optimized out>, state=<optimized out>, num_fields=<optimized out>, cont=<optimized
 out>)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">    at protocol/pool_process_query.c:4941<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#7 0x0000559ff3b742b3 in pool_process_query (frontend=<optimized out>, backend=<optimized out>, reset_request=<optimized out>) at protocol/pool_process_query.c:291<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#8 0x0000559ff3b6ce8a in do_child (fds=fds@entry=0x559ff530de90) at protocol/child.c:449<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#9 0x0000559ff3b41527 in fork_a_child (fds=0x559ff530de90, id=731) at main/pgpool_main.c:682<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#10 0x0000559ff3b46415 in failover () at main/pgpool_main.c:1996<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#11 0x0000559ff3b4579b in sigusr1_interupt_processor () at main/pgpool_main.c:1329<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#12 0x0000559ff3b48e4a in PgpoolMain (discard_status=<optimized out>, clear_memcache_oidmaps=<optimized out>) at main/pgpool_main.c:473<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">#13 0x0000559ff3b3f54c in main (argc=<optimized out>, argv=0x7ffcefd01658) at main/main.c:365<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">(gdb)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">The reason for the abnormal termination is that the value of the argument
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">node passed to function_call_walker is invalid.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">After analyzing the core, the caller is raw_expression_tree_walker,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">but the value of nodeTag(node) passed here is 0xE2 and T_List.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Here, the ListCell pointer retrieved by foreach() is invalid.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">List structure<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">(gdb) x/8gx $rbx<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">0x559ff531aa10: 0x0000000f000000e2 0x000000000000000f<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">0x559ff531aa20: 0x0000559ff5314000 0x0000559ff531a9c0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">0x559ff531aa30: 0x0000000000000008 0x00007f545af1a300<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">0x559ff531aa40: 0x0000006469727375 0x0000000000000020<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">(gdb) x/8gx 0x0000559ff5314000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">0x559ff5314000: 0x0000000000000000 0x0000000000000000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">0x559ff5314010: 0x0000000000000000 0x0001000100000000 <- argument of function_call_walker<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">0x559ff5314020: 0x0000000000000000 0x0000000000000000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">0x559ff5314030: 0x0000000000000000 0x0000000000000000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">The previous area is also cleared to 0.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">(gdb) x/4gx 0x0000559ff5314000-0x10<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">0x559ff5313ff0: 0x0000000000000000 0x0000000000000000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">0x559ff5314000: 0x0000000000000000 0x0000000000000000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">I think that it causes area(memory) destruction, but there is no corresponding bug fix<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">in the release notes after 4.2.8.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Is it a phenomenon that is recognized as a known defect?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">If it is not a known defect, I would like to identify the process causing the area destruction.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">What kind of method is there?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Note that this has only occurred once in the production environment,  and at this time we have not been able to reproduce it.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">--<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Tsuyoshi Inagaki<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><a href="mailto:tsuyoshi.inagaki.ej@hitachi.com">tsuyoshi.inagaki.ej@hitachi.com</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
</body>
</html>