Re: Race condition in WaitForBackgroundWorkerStartup

2018-11-13 Thread Amit Kapila
On Tue, Nov 13, 2018 at 11:48 PM Tomas Vondra wrote: > > On Tue, 2018-11-13 at 07:57 -0600, Jeremy Finzel wrote: > > ... > > > > I'm unclear on what counts as "worker initialization". The error is > > happening in the worker_spi_main function, not in the > > worker_spi_launch function. So does a

Re: Race condition in WaitForBackgroundWorkerStartup

2018-11-13 Thread Tomas Vondra
On Tue, 2018-11-13 at 07:57 -0600, Jeremy Finzel wrote: > ... > > I'm unclear on what counts as "worker initialization". The error is > happening in the worker_spi_main function, not in the > worker_spi_launch function. So does an immediate error in > worker_spi_main count as part of the worker i

Re: Race condition in WaitForBackgroundWorkerStartup

2018-11-13 Thread Jeremy Finzel
On Tue, Nov 13, 2018 at 6:17 AM Amit Kapila wrote: > On Mon, Nov 12, 2018 at 11:55 PM Jeremy Finzel wrote: > > > > I believe I found a race condition in WaitForBackgroundWorkerStartup in > the case where it encounters an ERROR during startup. I found that > depending on th

Re: Race condition in WaitForBackgroundWorkerStartup

2018-11-13 Thread Amit Kapila
On Mon, Nov 12, 2018 at 11:55 PM Jeremy Finzel wrote: > > I believe I found a race condition in WaitForBackgroundWorkerStartup in the > case where it encounters an ERROR during startup. I found that depending on > the speed of the system, it will unreliably return either status

Race condition in WaitForBackgroundWorkerStartup

2018-11-12 Thread Jeremy Finzel
I believe I found a race condition in WaitForBackgroundWorkerStartup in the case where it encounters an ERROR during startup. I found that depending on the speed of the system, it will unreliably return either status BGWH_STOPPED or BGWH_STARTED. But I can reliably reproduce getting BGWH_STOPPED