[pgpool-general: 5885] Re: Pgpool-3.7.1 segmentation fault

Tatsuo Ishii ishii at sraoss.co.jp
Wed Jan 24 12:00:40 JST 2018


> Thanks for the quick reply! I realized that I ended up in this state,
> because I was using indexed health checks, and the primary's health checks
> had been disabled. I've gone back to a single health_check config, to avoid
> this issue.

Do you have an issue with "indexed health checks"? I thought it was
fixed in 3.7.1.

I've also added an extra pre-start step, which removes the
> pgpool_status file.

That might be a solution but I would like to add a guard to Pgpool-II
against the segfault. The segfault occurs when conditions below are
all met:

1) fail_over_on_backend_error is off.
2) ALWAYS_MASTER flags is set to the master (writer) node.

Attached patch implements the guard against the segfault. Developers
will start a discussion regarding the patch in pgpool-hackers.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> On Tue, Jan 23, 2018 at 5:49 PM Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
> 
>> Hi Philip,
>>
>> > Hello poolers,
>> >
>> > I've compiled pgpool-3.7.1 (./configure --with-openssl; libpq.5.9), for
>> > Ubuntu 14.04, to connect to RDS Aurora Postgres (9.6.3). When I try to
>> > authenticate, pgpool child process segfaults. My config file follows the
>> > instructions set forth by the aurora instructions
>> > <http://www.pgpool.net/docs/latest/en/html/example-aurora.html>, I
>> think?
>> > Have I misconfigured something, to cause this segfault?
>> >
>> > Any guidance would be appreciated!
>> >
>> > Thanks,
>> > Philip
>> >
>> >
>> > $ psql -h localhost -U user staging
>> > Password for user user:
>> > psql: server closed the connection unexpectedly
>> >         This probably means the server terminated abnormally
>> >         before or while processing the request.
>>
>> It seems your status file (/var/log/pgpool/pool_status) is out of
>> date.
>>
>> > 2018-01-23 19:23:42: pid 19872: DEBUG:  creating new connection to
>> backend
>> > 2018-01-23 19:23:42: pid 19872: DETAIL:  skipping backend slot 0 because
>> > backend_status = 3
>>
>> So Pgpool-II failes to create a connection to backend0, which causes
>> the segfault later on. Surely Pgpool-II needs to have a guard for the
>> situation, but for now you could workaround this by shutting down
>> pgpool, removing /var/log/pgpool/pool_status, and restarting pgoool.
>>
>> Once proper pool_status is created, you don't need to repeat the
>> operation above. i.e. skip removing pool_status.
>>
>> Best regards,
>> --
>> Tatsuo Ishii
>> SRA OSS, Inc. Japan
>> English: http://www.sraoss.co.jp/index_en.php
>> Japanese:http://www.sraoss.co.jp
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: always_master.diff
Type: text/x-patch
Size: 554 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20180124/eb9807d1/attachment.bin>


More information about the pgpool-general mailing list