[pgpool-committers: 10190] pgpool: Fix Pgpool-II child process crash during shutdown.
Tatsuo Ishii
ishii at postgresql.org
Fri Nov 8 20:21:43 JST 2024
Fix Pgpool-II child process crash during shutdown.
It is reported that pgpool child process crashes during shutdown.
[pgpool-general: 9261] Re: Segmentation fault during shutdown
The actual crash was in close_all_backend_connections().
close_all_backend_connections() was called because on_system_exit
registers child_will_ho_down(). At the moment it seems pgpool child
had just started up and doing pool_init_cp(). The connection pool
object had not been completely initialized, that's cause of the crash.
To fix this, just remove the call to close_all_backend_connections()
in child_will_ho_down(). Although this will prevent the terminate
message ('X') being sent to backend, it should be harmless since
backend can take care such a disconnection without a terminate
message.
Problem reported and analyzed by: Emond Papegaaij
Backpatch-through: v4.2
Discussion: https://www.pgpool.net/pipermail/pgpool-general/2024-November/001938.html
Branch
------
master
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=25ad9e6d50343e2cbd4dc337803d231c92141021
Modified Files
--------------
src/protocol/child.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
More information about the pgpool-committers
mailing list