[PATCH] run-tests: "fix" race condition in race condition fix

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Jan 22 19:44:15 UTC 2016



On 01/22/2016 11:30 AM, timeless wrote:
> On Fri, Jan 22, 2016 at 2:00 PM, Bryan O'Sullivan <bos at serpentine.com> wrote:
>> # HG changeset patch
>> # User Bryan O'Sullivan <bryano at fb.com>
>> # Date 1453489213 28800
>> #      Fri Jan 22 11:00:13 2016 -0800
>> # Branch stable
>> # Node ID 6bb64e83ac188ee99528ad0237028f00047ab505
>> # Parent  0b752757a0c4f30ac755389014e2af9d2e0b4a3f
>> run-tests: "fix" race condition in race condition fix
>>
>> Laurent's commit 3203dfe341f9 still suffers from a race: by the
>> time the "job" function tries to assign to channels[channel], that
>> list has been truncated to empty.  The result is that every job
>> thread raises an IndexError.
>>
>> Earlier, I tried an approach of correctly locking channels, but
>> that caused run-tests to hang on KeyboardInterrupt sometimes.
>>
>> This approach is strictly hackier, but seems to actually work
>> reliably.
>
> I really wish this worked :(

How much of your issue is related to "bryan patch failure to fix the 
race introduced by Laurent" and how much is it of "run-tests.py 
interruption have been borked since forever"? I've personnally never 
have been confortable with ctrl^C run-tests.py in years.

-- 
Pierre-Yves David



More information about the Mercurial-devel mailing list