Re: processes stuck in shutdown following OOM/recovery

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: processes stuck in shutdown following OOM/recovery
Дата
Msg-id CA+hUKGKOW1ON3Cae1OUtHEPyFKc7O_XGGrUKfa9t5Ce0aLbeFQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: processes stuck in shutdown following OOM/recovery  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: processes stuck in shutdown following OOM/recovery
Re: processes stuck in shutdown following OOM/recovery
Список pgsql-hackers
On Sat, Dec 2, 2023 at 3:30 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> On Sat, Dec 2, 2023 at 2:18 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> > On Fri, Dec 1, 2023 at 6:13 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> > > $ kill -9 2524495; sleep 0.05; pg_ctl -D ./pgdev.dat1 stop -m fast # 2524495 is a child's pid
> >
> > > This affects v15, and fails at ) but not its parent.
> >
> > Repro'd here.  I had to make the sleep shorter on my system.  Looking...
>
> The PostmasterStateMachine() case for PM_WAIT_BACKENDS doesn't tell
> the checkpointer to shut down in this race case.  We have
> CheckpointerPID != 0 (because 7ff23c6d27 starts it earlier than
> before), and FatalError is true because a child recently crashed and
> we haven't yet received the PMSIGNAL_RECOVERY_STARTED handler that
> would clear it.  Hmm.

Here is a first attempt at fixing this.  I am not yet 100% sure if it
is right, and there may be a nicer/simpler way to express the
conditions.  It passes the test suite, and it fixes the repro that
Justin posted.  FYI on my machine I had to use sleep 0.005 where he
had 0.05, as an FYI if someone else is trying to reproduce the issue.

Вложения

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

Предыдущее
От: Alena Rybakina
Дата:
Сообщение: Re: Support "Right Semi Join" plan shapes
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: remaining sql/json patches