On Fri, Dec 22, 2017 at 12:00 AM, Andres Freund <and...@anarazel.de> wrote: > Oh. This seems to be a condition variable bug independent of PHJ. The > problem is that the DSM segment etc all get cleaned up in > *subtransaction* abort. > > Afaict it's a bug that AbortTransaction() does > ConditionVariableCancelSleep() but AbortSubTransaction() does not, > despite the latter releasing dsm segments via > ResourceOwnerRelease(RESOURCE_RELEASE_BEFORE_LOCKS). > > Adding that seems to fix the crash. > > This seems like something we need to backpatch.
Agreed. That affects any user of condition variables inside DSM segments, including the released Parallel Index Scan and Parallel Bitmap Heap Scan code. -- Thomas Munro http://www.enterprisedb.com