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

Tatsuo Ishii ishii at postgresql.org
Thu Mar 26 08:57:54 JST 2015


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