Re: Async-unsafe functions in signal handlers
От | Denis Smirnov |
---|---|
Тема | Re: Async-unsafe functions in signal handlers |
Дата | |
Msg-id | 214224BE-DF50-4BA0-9170-36DF813F2BEA@arenadata.io обсуждение исходный текст |
Ответ на | Re: Async-unsafe functions in signal handlers (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: Async-unsafe functions in signal handlers
|
Список | pgsql-hackers |
> 28 авг. 2021 г., в 07:05, Andres Freund <andres@anarazel.de> написал(а): > > However, we have a > bandaid that deals with possible hangs, by SIGKILLing when processes don't > shut down (at that point things have already gone quite south, so that's not > an issue). Thanks for the explanation. I can see that child process SIGKILL machinery was introduced by 82233ce7ea42d6ba519aaec63008aff49da6c7afcommit to fix a malloc() deadlock in quickdie() signal handler. As a result, allchild processes that die too long are killed in the ServerLoop() with SIGKILL. But bgworker_die() is a problem as we initializebgworkers right before ServerLoop(). So we can face malloc() deadlock on postmaster startup (before ServerLoop()started). Maybe we should simply use write() and exit() instead of ereport() for bgworker_die()? Best regards, Denis Smirnov | Developer sd@arenadata.io Arenadata | Godovikova 9-17, Moscow 129085 Russia
В списке pgsql-hackers по дате отправления: