[LLVMdev] Deadlock in llvm-lit on windows 7

Daniel Dunbar daniel at zuster.org
Mon Jan 26 13:29:13 PST 2015


Have you been able to isolate the test which causes the deadlock? You
should be able to get close to figuring it out by seeing which processes
are hung and maybe which tests aren't finished...

 - Daniel

On Mon, Jan 26, 2015 at 9:57 AM, Sumanth Gundapaneni <
sgundapa at codeaurora.org> wrote:

> Hi,
>
>      I am observing a deadlock with llvm-lit on windows 7.
>
> When I attached a debugger, the communicate() call is blocked.
>
>
>
> In file utils/lit/lit/TestRunner.py
>
> >    # FIXME: There is probably still deadlock potential here. Yawn.
>
> >   procData = [None] * len(procs)
>
> >    procData[-1] = procs[-1].communicate()
>
>
>
> I am invoking python directly on windows to run the unit tests.
>
> C:\Python27\python.exe C:\build\llvm\Release\bin\llvm-lit.py -v -j 12
> --param build_mode=Release --param build_config=Win32
> llvm_site_config=C:\llvm_on_win\nightly\build\llvm\tools\polly\test\lit.site.cfg
> test
>
> Note: If I invoke with ā€œ-j 1ā€ , the unit tests finish but took a lot of
> time. There is no deadlock. I am using python version 2.7.6.
>
>
>
> At this moment, I believe the issue is caused by stdout filling the OS
> buffer there by blocking the communicate() call.
>
> It is possible some of the unit tests dump a lot of text/data to stdout.
> FYI, I have a couple of unit tests of my own in the code base.
>
> On Linux, there is no deadlock but on windows I am hitting a deadlock 7
> out of 10 times. I tried invoking python with ā€œ-uā€ but in vain.
>
>
>
> When I looked at llvm-lit code, I saw the code to avoid deadlocks but
> there was no guarantee, like the one I pasted above.
>
> Would appreciate if some one take a look at it and provide more context on
> deadlocks.
>
>
>
> --Sumanth G
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150126/d49e261b/attachment.html>


More information about the llvm-dev mailing list