<div dir="ltr">Hi Tatsuo<div><br></div><div>Thanks for catching this. It somehow slipped through the cracks while testing. The segfault was already present there and not caused by last check-in. </div><div>Although I was able to reproduce the crash by following the steps you mentioned, but I was getting the different stack trace for the crash. I have found the problem and pushed the fix for that. Now the mentioned scenario is working fine and I am getting the clean regression.</div><div>Can you confirm if it also fixes the segfault at your side.</div><div><br></div><div>Thanks</div><div>Best regards!</div><div>Muhammad Usama</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 26, 2015 at 4:57 AM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Usama,<br>
<br>
Thank you for the fix.<br>
<br>
However the fix has a problem: when if pgpool-II already has a<br>
connection cache to backend, pgpool-II segfaults. To easily reproduce<br>
the problem, you set num_init_children to 1 which forces pgpool-II to<br>
reuse same child process instance for incoming connections.<br>
<br>
Here is a pgpool log:<br>
<br>
2015-03-26 08:52:56: pid 14970: LOG:  new connection received<br>
2015-03-26 08:52:56: pid 14970: DETAIL:  connecting host=[local]<br>
2015-03-26 08:55:18: pid 14957: WARNING:  child process with pid: 14970 was terminated by segmentation fault<br>
<br>
Here is the stack trace:<br>
<br>
Program received signal SIGSEGV, Segmentation fault.<br>
MemoryContextDelete (context=0x25f34c0) at ../../src/utils/mmgr/mcxt.c:184<br>
184             MemoryContextDeleteChildren(context);<br>
(gdb) bt<br>
#0  MemoryContextDelete (context=0x25f34c0) at ../../src/utils/mmgr/mcxt.c:184<br>
#1  0x000000000046ab25 in MemoryContextDeleteChildren (context=0x25f34c0)<br>
    at ../../src/utils/mmgr/mcxt.c:213<br>
#2  0x000000000046aae9 in MemoryContextDelete (context=0x25f34c0) at ../../src/utils/mmgr/mcxt.c:184<br>
#3  0x000000000046ab25 in MemoryContextDeleteChildren (context=0x25f34c0)<br>
    at ../../src/utils/mmgr/mcxt.c:213<br>
#4  0x000000000046aae9 in MemoryContextDelete (context=0x25f34c0) at ../../src/utils/mmgr/mcxt.c:184<br>
#5  0x000000000046ab25 in MemoryContextDeleteChildren (context=0x25f34c0)<br>
    at ../../src/utils/mmgr/mcxt.c:213<br>
#6  0x000000000046aae9 in MemoryContextDelete (context=0x25f34c0) at ../../src/utils/mmgr/mcxt.c:184<br>
#7  0x000000000046ab25 in MemoryContextDeleteChildren (context=0x25f34c0)<br>
    at ../../src/utils/mmgr/mcxt.c:213<br>
(repeats forever)<br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
<br>
&gt; Fix for pgpool-II emits a fatal error message when clear text password auth is used.<br>
&gt;<br>
&gt; The problem was introduced in pgpool-II after inclusion of exception manager.<br>
&gt; EOF on the frontend connection during client authentication should not be treated<br>
&gt; as an error when the password authentication method is used. psql disconnects<br>
&gt; from the server in such case to get the password from the terminal,<br>
&gt; reconnects and sends the read password to server.<br>
&gt;<br>
&gt; The check-in also enhances the error messages for authentication failures<br>
&gt; by concatenating backend errors to pgpool error report.<br>
&gt;<br>
&gt; Branch<br>
&gt; ------<br>
&gt; master<br>
&gt;<br>
&gt; Details<br>
&gt; -------<br>
&gt; <a href="http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=46a3982714b19ceaab1612b00b85ea31a053c25d" target="_blank">http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=46a3982714b19ceaab1612b00b85ea31a053c25d</a><br>
&gt;<br>
&gt; Modified Files<br>
&gt; --------------<br>
&gt; src/auth/pool_auth.c    |   39 +++++++++++++++++++++++++++++++++++++--<br>
&gt; src/include/pool.h      |    2 ++<br>
&gt; src/protocol/child.c    |   11 ++++++++++-<br>
&gt; src/utils/pool_stream.c |    5 ++++-<br>
&gt; 4 files changed, 53 insertions(+), 4 deletions(-)<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; pgpool-committers mailing list<br>
&gt; <a href="mailto:pgpool-committers@pgpool.net">pgpool-committers@pgpool.net</a><br>
&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-committers" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-committers</a><br>
</blockquote></div><br></div>