This is an archive of the discontinued LLVM Phabricator instance.

Work around a race condition in lldbtest.py for Windows.
ClosedPublic

Authored by amccarth on Sep 4 2015, 11:32 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

amccarth updated this revision to Diff 34053.Sep 4 2015, 11:32 AM
amccarth retitled this revision from to Work around a race condition in lldbtest.py for Windows..
amccarth updated this object.
amccarth added a reviewer: zturner.
amccarth added a subscriber: lldb-commits.
sas added a subscriber: sas.Sep 4 2015, 12:45 PM

Can you just explain why this race happens?
Otherwise, looks good.

zturner edited edge metadata.Sep 4 2015, 12:55 PM
zturner added a subscriber: zturner.

Windows is well-known (I wouldn't say documented necessarily, but it seems
everyone has run into this problem before) where there is a very short
window after a process exits where some of the handles that were used by
the file (e.g. open files, the image file itself, etc) are still locked by
the operating system. It doesn't happen every time, or even on every
machine (I've never been able to reproduce Adrian's problem on my Windows
10 machine, for example)

Maybe it's due to the search indexer, maybe it's due to antivirus, maybe
it's due to a bug in the kernel. LLVM just had a similar problem just this
week and fixed it with a similar workaround (
http://llvm.org/viewvc/llvm-project?rev=246708&view=rev)

amccarth updated this revision to Diff 34063.Sep 4 2015, 1:05 PM
amccarth edited edge metadata.

I've put more detail in the comment.

sas accepted this revision.Sep 4 2015, 1:41 PM
sas added a reviewer: sas.

Wow, this is funny.

Thanks for the explanation @zturner and thanks for adding the comment @amccarth.

This revision is now accepted and ready to land.Sep 4 2015, 1:41 PM
This revision was automatically updated to reflect the committed changes.