From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | Andreas Seltenreich <seltenreich(at)gmx(dot)de> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM |
Date: | 2017-10-02 21:05:16 |
Message-ID: | CAEepm=0W-JWedyTqfyT7eUeZ3yiU9jpUSPC_dJhbY90mbNmWkA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Oct 3, 2017 at 9:56 AM, Andreas Seltenreich <seltenreich(at)gmx(dot)de> wrote:
> low-memory testing with REL_10_STABLE at 1f19550a87 produced the
> following PANIC:
>
> stuck spinlock detected at pg_stat_get_wal_receiver, walreceiver.c:1397
>
> I was about to wrap the pstrdup()s with a PG_TRY block, but I can't find
> a spinlock being released in a PG_CATCH block anywhere, so maybe that's
> a bad idea?
No comment on what might be holding the spinlock there, but perhaps
the spinlock-protected code should strncpy into stack-local buffers
instead of calling pstrdup()? The buffers could be statically sized
with NAMEDATALEN and MAXCONNINFO.
--
Thomas Munro
http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2017-10-02 21:08:05 | Re: [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM |
Previous Message | Andreas Seltenreich | 2017-10-02 20:56:49 | [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM |