pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix segmentation fault that commit ac22929a26 caused.
Date: Wed, 04 Nov 2020 12:51:53 +0000
Message-ID: <E1kaIGX-0002xp-RC@gemulon.postgresql.org> (raw)

Fix segmentation fault that commit ac22929a26 caused.

Commit ac22929a26 changed recoveryWakeupLatch so that it's reset to
NULL at the end of recovery. This change could cause a segmentation fault
in the buildfarm member 'elver'.

Previously the latch was reset to NULL after calling ShutdownWalRcv().
But there could be a window between ShutdownWalRcv() and the actual
exit of walreceiver. If walreceiver set the latch during that window,
the segmentation fault could happen.

To fix the issue, this commit changes walreceiver so that it sets
the latch only when the latch has not been reset to NULL yet.

Author: Fujii Masao
Discussion: https://postgr.es/m/5c1f8a85-747c-7bf9-241e-dd467d8a3586@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/113d3591b859fb8dc191bc0599d1ad62d91f1aa4

Modified Files
--------------
src/backend/access/transam/xlog.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



Message-ID: <E1kaIGX-0002xp-RC@gemulon.postgresql.org>
Permalink:  ../E1kaIGX-0002xp-RC@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kaIGX-0002xp-RC@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org
  Subject: Re: pgsql: Fix segmentation fault that commit ac22929a26 caused.
  In-Reply-To: <E1kaIGX-0002xp-RC@gemulon.postgresql.org>
  References: <E1kaIGX-0002xp-RC@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox