[pgpool-hackers: 839] Re: [pgpool-committers: 2498] pgpool: Fix for pgpool-II emits a fatal error message when clear text p

Tatsuo Ishii ishii at postgresql.org
Fri Mar 27 08:22:15 JST 2015


Hi Usama,

> 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.

Oh, I didn' realize that.

> 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.
> Can you confirm if it also fixes the segfault at your side.

Everything looks fine for me. Thanks!
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Thanks
> Best regards!
> Muhammad Usama
> 
> 
> On Thu, Mar 26, 2015 at 4:57 AM, Tatsuo Ishii <ishii at postgresql.org> wrote:
> 
>> Hi Usama,
>>
>> Thank you for the fix.
>>
>> However the fix has a problem: when if pgpool-II already has a
>> connection cache to backend, pgpool-II segfaults. To easily reproduce
>> the problem, you set num_init_children to 1 which forces pgpool-II to
>> reuse same child process instance for incoming connections.
>>
>> Here is a pgpool log:
>>
>> 2015-03-26 08:52:56: pid 14970: LOG:  new connection received
>> 2015-03-26 08:52:56: pid 14970: DETAIL:  connecting host=[local]
>> 2015-03-26 08:55:18: pid 14957: WARNING:  child process with pid: 14970
>> was terminated by segmentation fault
>>
>> Here is the stack trace:
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> MemoryContextDelete (context=0x25f34c0) at ../../src/utils/mmgr/mcxt.c:184
>> 184             MemoryContextDeleteChildren(context);
>> (gdb) bt
>> #0  MemoryContextDelete (context=0x25f34c0) at
>> ../../src/utils/mmgr/mcxt.c:184
>> #1  0x000000000046ab25 in MemoryContextDeleteChildren (context=0x25f34c0)
>>     at ../../src/utils/mmgr/mcxt.c:213
>> #2  0x000000000046aae9 in MemoryContextDelete (context=0x25f34c0) at
>> ../../src/utils/mmgr/mcxt.c:184
>> #3  0x000000000046ab25 in MemoryContextDeleteChildren (context=0x25f34c0)
>>     at ../../src/utils/mmgr/mcxt.c:213
>> #4  0x000000000046aae9 in MemoryContextDelete (context=0x25f34c0) at
>> ../../src/utils/mmgr/mcxt.c:184
>> #5  0x000000000046ab25 in MemoryContextDeleteChildren (context=0x25f34c0)
>>     at ../../src/utils/mmgr/mcxt.c:213
>> #6  0x000000000046aae9 in MemoryContextDelete (context=0x25f34c0) at
>> ../../src/utils/mmgr/mcxt.c:184
>> #7  0x000000000046ab25 in MemoryContextDeleteChildren (context=0x25f34c0)
>>     at ../../src/utils/mmgr/mcxt.c:213
>> (repeats forever)
>>
>> Best regards,
>> --
>> Tatsuo Ishii
>> SRA OSS, Inc. Japan
>> English: http://www.sraoss.co.jp/index_en.php
>> Japanese:http://www.sraoss.co.jp
>>
>> > Fix for pgpool-II emits a fatal error message when clear text password
>> auth is used.
>> >
>> > The problem was introduced in pgpool-II after inclusion of exception
>> manager.
>> > EOF on the frontend connection during client authentication should not
>> be treated
>> > as an error when the password authentication method is used. psql
>> disconnects
>> > from the server in such case to get the password from the terminal,
>> > reconnects and sends the read password to server.
>> >
>> > The check-in also enhances the error messages for authentication failures
>> > by concatenating backend errors to pgpool error report.
>> >
>> > Branch
>> > ------
>> > master
>> >
>> > Details
>> > -------
>> >
>> http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=46a3982714b19ceaab1612b00b85ea31a053c25d
>> >
>> > Modified Files
>> > --------------
>> > src/auth/pool_auth.c    |   39 +++++++++++++++++++++++++++++++++++++--
>> > src/include/pool.h      |    2 ++
>> > src/protocol/child.c    |   11 ++++++++++-
>> > src/utils/pool_stream.c |    5 ++++-
>> > 4 files changed, 53 insertions(+), 4 deletions(-)
>> >
>> > _______________________________________________
>> > pgpool-committers mailing list
>> > pgpool-committers at pgpool.net
>> > http://www.pgpool.net/mailman/listinfo/pgpool-committers
>>


More information about the pgpool-hackers mailing list