core dumps generated in archive / restore commands etc

Поиск
Список
Период
Сортировка
От Andres Freund
Тема core dumps generated in archive / restore commands etc
Дата
Msg-id 20221206215806.ka2sq3x7ukipgryy@awork3.anarazel.de
обсуждение исходный текст
Список pgsql-hackers
Hi,

Occasionally I see core dumps for sh, cp etc when running the tests. I think
this is mainly due to immediate shutdowns / crashes signalling the entire
process group with SIGQUIT. If a sh/cp/... is running as part of an
archive/restore command when the signal arrives, we'll trigger a coredump,
because those tools won't have a SIGQUIT handler.

ISTM that postmaster's signal_child() shouldn't send SIGQUIT to the process
group in the #ifdef HAVE_SETSID section. We've already signalled the backend
with SIGQUIT, so we could change the signal we send to the whole process group
to one that doesn't trigger core dumps by default. SIGTERM seems like it would
be the right choice.

The one non-trivial aspect of this is that that signal will also be delivered
to the group leader. It's possible that that could lead to some minor test
behaviour issues, because the output could change if e.g. SIGTERM is received
/ processed first.

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: New strategies for freezing, advancing relfrozenxid early
Следующее
От: Pavel Borisov
Дата:
Сообщение: Re: Allow placeholders in ALTER ROLE w/o superuser