raghesh via llvm-dev
2019-Aug-21 08:12 UTC
[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. ------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190821/6a6fae65/attachment.html>
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:llvm-dev-bounces at lists.llvm.org] On Behalf Of raghesh via llvm-dev Sent: Wednesday, August 21, 2019 4:13 AM To: llvm-dev at lists.llvm.org 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. ------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190821/be42a74c/attachment.html>