pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Cancel CV sleep during subtransaction abort.
Date: Thu, 21 Dec 2017 14:25:03 +0000
Message-ID: <E1eS1mR-0002Jm-PJ@gemulon.postgresql.org> (raw)

Cancel CV sleep during subtransaction abort.

Generally, error recovery paths that need to do things like
LWLockReleaseAll and pgstat_report_wait_end also need to call
ConditionVariableCancelSleep, but AbortSubTransaction was missed.

Since subtransaction abort might destroy up the DSM segment that
contains the ConditionVariable stored in cv_sleep_target, this
can result in a crash for anything using condition variables.

Reported and diagnosed by Andres Freund.

Discussion: http://postgr.es/m/20171221110048.rxk6464azzl5t2fi@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/59d1e2b95a826869e2789ffe01e9e552148eefde

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



view thread (2+ messages)  latest in thread

Message-ID: <E1eS1mR-0002Jm-PJ@gemulon.postgresql.org>
Permalink:  ../E1eS1mR-0002Jm-PJ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eS1mR-0002Jm-PJ@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: rhaas@postgresql.org
  Subject: Re: pgsql: Cancel CV sleep during subtransaction abort.
  In-Reply-To: <E1eS1mR-0002Jm-PJ@gemulon.postgresql.org>
  References: <E1eS1mR-0002Jm-PJ@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