Re: processes stuck in shutdown following OOM/recovery

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Thomas Munro <tmunro(at)postgresql(dot)org>
Subject: Re: processes stuck in shutdown following OOM/recovery
Date: 2023-12-02 02:30:09
Message-ID: CA+hUKGJAL2BoSmC_qFxZF-=CFpptDUDzsFjpsOCwKtUa0uahhA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 2, 2023 at 2:18 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Fri, Dec 1, 2023 at 6:13 PM Justin Pryzby <pryzby(at)telsasoft(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2023-12-02 03:00:01 Re: Refactoring backend fork+exec code
Previous Message Tom Lane 2023-12-02 01:51:11 Re: [PATCH] plpython function causes server panic