pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). 7+ messages / 1 participants [nested] [flat]
* pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). @ 2020-01-20 17:57 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-01-20 17:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump's sigTermHandler() to use _exit() not exit(). sigTermHandler() tried to be careful to invoke only operations that are safe to do in a signal handler. But for some reason we forgot that exit(3) is not among those, because it calls atexit handlers that might do various random things. (pg_dump itself installs no atexit handlers, but e.g. OpenSSL does.) That led to crashes or lockups when attempting to terminate a parallel dump or restore via a signal. Fix by calling _exit() instead. Per bug #16199 from Raúl Marín. Back-patch to all supported branches. Discussion: https://postgr.es/m/16199-cb2f121146a96f9b@postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/cd23a2019c4b8da47905e91c8a841cadac978a32 Modified Files -------------- src/bin/pg_dump/parallel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). @ 2020-01-20 17:57 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-01-20 17:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump's sigTermHandler() to use _exit() not exit(). sigTermHandler() tried to be careful to invoke only operations that are safe to do in a signal handler. But for some reason we forgot that exit(3) is not among those, because it calls atexit handlers that might do various random things. (pg_dump itself installs no atexit handlers, but e.g. OpenSSL does.) That led to crashes or lockups when attempting to terminate a parallel dump or restore via a signal. Fix by calling _exit() instead. Per bug #16199 from Raúl Marín. Back-patch to all supported branches. Discussion: https://postgr.es/m/16199-cb2f121146a96f9b@postgresql.org Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/71b121f425486c2a02f88f90e2a7c852182b5af0 Modified Files -------------- src/bin/pg_dump/parallel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). @ 2020-01-20 17:57 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-01-20 17:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump's sigTermHandler() to use _exit() not exit(). sigTermHandler() tried to be careful to invoke only operations that are safe to do in a signal handler. But for some reason we forgot that exit(3) is not among those, because it calls atexit handlers that might do various random things. (pg_dump itself installs no atexit handlers, but e.g. OpenSSL does.) That led to crashes or lockups when attempting to terminate a parallel dump or restore via a signal. Fix by calling _exit() instead. Per bug #16199 from Raúl Marín. Back-patch to all supported branches. Discussion: https://postgr.es/m/16199-cb2f121146a96f9b@postgresql.org Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4ea5cf403824e98932aa17c1c00f9c5241daf89d Modified Files -------------- src/bin/pg_dump/parallel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). @ 2020-01-20 17:57 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-01-20 17:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump's sigTermHandler() to use _exit() not exit(). sigTermHandler() tried to be careful to invoke only operations that are safe to do in a signal handler. But for some reason we forgot that exit(3) is not among those, because it calls atexit handlers that might do various random things. (pg_dump itself installs no atexit handlers, but e.g. OpenSSL does.) That led to crashes or lockups when attempting to terminate a parallel dump or restore via a signal. Fix by calling _exit() instead. Per bug #16199 from Raúl Marín. Back-patch to all supported branches. Discussion: https://postgr.es/m/16199-cb2f121146a96f9b@postgresql.org Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6f6daa1be78503ee3d171d28ed9f6843cc53d129 Modified Files -------------- src/bin/pg_dump/parallel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). @ 2020-01-20 17:57 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-01-20 17:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump's sigTermHandler() to use _exit() not exit(). sigTermHandler() tried to be careful to invoke only operations that are safe to do in a signal handler. But for some reason we forgot that exit(3) is not among those, because it calls atexit handlers that might do various random things. (pg_dump itself installs no atexit handlers, but e.g. OpenSSL does.) That led to crashes or lockups when attempting to terminate a parallel dump or restore via a signal. Fix by calling _exit() instead. Per bug #16199 from Raúl Marín. Back-patch to all supported branches. Discussion: https://postgr.es/m/16199-cb2f121146a96f9b@postgresql.org Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/208e262f9246df9050aee63a933bb8b7fe265163 Modified Files -------------- src/bin/pg_dump/parallel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). @ 2020-01-20 17:57 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-01-20 17:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump's sigTermHandler() to use _exit() not exit(). sigTermHandler() tried to be careful to invoke only operations that are safe to do in a signal handler. But for some reason we forgot that exit(3) is not among those, because it calls atexit handlers that might do various random things. (pg_dump itself installs no atexit handlers, but e.g. OpenSSL does.) That led to crashes or lockups when attempting to terminate a parallel dump or restore via a signal. Fix by calling _exit() instead. Per bug #16199 from Raúl Marín. Back-patch to all supported branches. Discussion: https://postgr.es/m/16199-cb2f121146a96f9b@postgresql.org Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b1392a9502016fcd3c93ba18ab418e11424b711e Modified Files -------------- src/bin/pg_dump/parallel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). @ 2020-01-20 17:57 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 7+ messages in thread From: Tom Lane @ 2020-01-20 17:57 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix pg_dump's sigTermHandler() to use _exit() not exit(). sigTermHandler() tried to be careful to invoke only operations that are safe to do in a signal handler. But for some reason we forgot that exit(3) is not among those, because it calls atexit handlers that might do various random things. (pg_dump itself installs no atexit handlers, but e.g. OpenSSL does.) That led to crashes or lockups when attempting to terminate a parallel dump or restore via a signal. Fix by calling _exit() instead. Per bug #16199 from Raúl Marín. Back-patch to all supported branches. Discussion: https://postgr.es/m/16199-cb2f121146a96f9b@postgresql.org Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/42e538fe673b20d9adfc46bc889f3eb16ceb6538 Modified Files -------------- src/bin/pg_dump/parallel.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2020-01-20 17:57 UTC | newest] Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-01-20 17:57 pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). Tom Lane <tgl@sss.pgh.pa.us> 2020-01-20 17:57 pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). Tom Lane <tgl@sss.pgh.pa.us> 2020-01-20 17:57 pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). Tom Lane <tgl@sss.pgh.pa.us> 2020-01-20 17:57 pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). Tom Lane <tgl@sss.pgh.pa.us> 2020-01-20 17:57 pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). Tom Lane <tgl@sss.pgh.pa.us> 2020-01-20 17:57 pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). Tom Lane <tgl@sss.pgh.pa.us> 2020-01-20 17:57 pgsql: Fix pg_dump's sigTermHandler() to use _exit() not exit(). Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox