Re: Windows buildfarm members vs. new async-notify isolation test

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Mark Dilger <hornschnorter(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Windows buildfarm members vs. new async-notify isolation test
Date: 2019-12-08 16:22:08
Message-ID: 7634.1575822128@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> writes:
>> IIUC, once the dispatch thread has queued the signal
>> (pg_queue_signal), the next CHECK_FOR_INTERRUPTS by the main thread
>> will execute the signal. So, if we move pg_queue_signal() before we
>> do WriteFile in pg_signal_dispatch_thread(), this race condition will
>> be closed. Now, we might not want to do this as that will add some
>> more time (even though very less) before notify on the other side can
>> finish or maybe there is some technical problem with this idea which I
>> am not able to see immediately.

> Hmm. Certainly worth trying to see if it resolves the failure on
> Andrew's machines.

For Andrew's convenience, here's a draft patch for that. I took the
liberty of improving the rather thin comments in this area, too.

regards, tom lane

Attachment Content-Type Size
this-might-fix-windows-race-condition.patch text/x-diff 2.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-12-08 16:57:46 Re: Windows buildfarm members vs. new async-notify isolation test
Previous Message Tom Lane 2019-12-08 14:53:14 Re: Windows buildfarm members vs. new async-notify isolation test