Re: [HACKERS] Latch reset ordering bug in condition_variable.c

2017-02-09 Thread Robert Haas
On Thu, Feb 9, 2017 at 6:01 AM, Thomas Munro wrote: > ConditionVariablePrepareToSleep() has a race that can leave you > hanging, introduced by me in the v4 patch. The problem is that that > function resets our latch after adding our process to the wakeup list. >

[HACKERS] Latch reset ordering bug in condition_variable.c

2017-02-09 Thread Thomas Munro
Hi, ConditionVariablePrepareToSleep() has a race that can leave you hanging, introduced by me in the v4 patch. The problem is that that function resets our latch after adding our process to the wakeup list. With the right timing, the following sequence can happen: 1.