Cancel CV sleep during subtransaction abort.

Robert Haas <rhaas@postgresql.org>

Commit: f3decdc94ea3dea05715325757db7b0295672bbe
Author: Robert Haas <rhaas@postgresql.org>
Date: 2017-12-21T14:24:48Z
Releases: 10.2
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

Files

PathChange+/−
src/backend/access/transam/xact.c modified +3 −0

Discussion