-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-deterministic test suite execution failures #5024
Comments
Can confirm, the same happens in our CI with exactly the same It fails when test dependencies are built and installed. Currently we have to work around and use |
Here's another one https://travis-ci.org/github/fpco/inline-c/jobs/734110470 |
I'm experiencing the same issue in my company's CI system with Github Actions. |
Thanks to this issue I was able to reproduce locally. Some more details: We have a multi-project repository. Six projects have test suites, five with one each and one with two. (Some other projects have no tests.) If I run a loop
It fails sooner or later, usually after less than a minute, with the error in question, spending about 5s on each test run. I've seen between one and four copies of the error, e.g. one attempt gave
It seems like there's one copy for each project whose tests fail to run. Hypothesis: at least one project's tests will always run, so I might eventually see five copies but not six. If I specify a single test suite ( If I run with
and a corresponding It looks like this is definitely happening while running tests. I can't rule out that it would also happen in other steps. But depending on use case, for at least some users (and possibly including for ourselves) it might work to build and run tests separately, i.e. something like
This is with stack
(It would probably be good to get a tarball with a minimal test case for reproduction, but I'm unlikely to get to that any time soon.) |
I can reproduce this every time with my project. stack really doesn't handle 56 threads well. |
Since the build temporary directory is shared between jobs, we can't use the same file name for the `test-ghc-env` for all of them. Fixes commercialhaskell#5024
General summary/comments (optional)
stack test
seems to non-deterministically fail when executing a test suite for a multi-project repository with parallelism enabled (e.g.stack build -j8 --test
) with the following errors:I haven't been able to pin down a reliable reproduction, however if I were to guess I'd say it's got something to do with the
testGhcEnvRelFile
, possible either colliding with an existing on in this call:stack/src/Stack/Build/Execute.hs
Line 1965 in 06cda68
...or bubbling up from
Cabal
orghc
somehow?Steps to reproduce
Unable to reliably reproduce.
Expected
stack build -j8 --test
should successfully execute all tests in a multi-project repository.Actual
stack build -j8 --test
fails non-deterministically with an error message about busy resources (locked files).Stack version
Method of installation
cabal-install
The text was updated successfully, but these errors were encountered: