[llvm-dev] make check error for remove-global-vars.ll

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] make check error for remove-global-vars.ll

Rajesh S R via llvm-dev
Hi All,

The 'make check -j' command fails occasionally for the testcase remove-global-vars.ll, which is added in a recent commit.

We suspect this is because of a race condition occurring due to the simultaneous read of the file reduce.ll by FileCheck (when make check -j is used), which is generated by llvm-reduce. The file reduce.ll is both consumed by the testcases remove-global-vars.ll and remove-funcs.ll, which when executed in parallel, one of them might read the wrong reduce.ll generated by the other.

Could someone confirm this indeed is the case?

Regards,
------------------------------
Raghesh Aloor
Sr. Software Engineer
AMD India Pvt. Ltd.
Bengaluru.
------------------------------

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] make check error for remove-global-vars.ll

Rajesh S R via llvm-dev

Caveat: I don't know anything specific about llvm-reduce.

The source for llvm-reduce.cpp shows that the default output file is 'reduce.ll'.  However, the RUN lines on the tests specify "-o -" meaning the tests shouldn't create a 'reduce.ll' file at all.

The tool does make an effort to create a unique temporary file for the intermediate reduction attempts; see Delta.cpp.  It's not impossible that there is some kind of filesystem race condition that permits two processes to try to generate the same file, although the Support library does try to avoid this.  Delta.cpp uses only 3 random characters (the '%' characters are replaced by random hex digits) so you could try adding another '%' and see if that makes your problem go away.

HTH,

--paulr

 

From: llvm-dev [mailto:[hidden email]] On Behalf Of raghesh via llvm-dev
Sent: Wednesday, August 21, 2019 4:13 AM
To: [hidden email]
Subject: [llvm-dev] make check error for remove-global-vars.ll

 

Hi All,

 

The 'make check -j' command fails occasionally for the testcase remove-global-vars.ll, which is added in a recent commit.

 

We suspect this is because of a race condition occurring due to the simultaneous read of the file reduce.ll by FileCheck (when make check -j is used), which is generated by llvm-reduce. The file reduce.ll is both consumed by the testcases remove-global-vars.ll and remove-funcs.ll, which when executed in parallel, one of them might read the wrong reduce.ll generated by the other.

 

Could someone confirm this indeed is the case?

 

Regards,

------------------------------

Raghesh Aloor

Sr. Software Engineer

AMD India Pvt. Ltd.

Bengaluru.

------------------------------


_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev