Skip to content
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

PackageTests/NewBuild/CmdRun/Terminate brittle, may fail on CI #8416

Open
andreasabel opened this issue Aug 22, 2022 · 9 comments
Open

PackageTests/NewBuild/CmdRun/Terminate brittle, may fail on CI #8416

andreasabel opened this issue Aug 22, 2022 · 9 comments

Comments

@andreasabel
Copy link
Member

The test PackageTests/NewBuild/CmdRun/Terminate has been caught to fail on CI. Maybe it has races?
There was a previous attempt to fix this issue:

Ping @robx .

https://github.com/haskell/cabal/runs/7945613288?check_suite_focus=true#step:17:35

...
threads: 2
tests to run: 427
PackageTests/NewBuild/CmdRun/Terminate/cabal.test.hs                                                              FAIL (12.33s)
...
Building executable 'exe' for RunKill-1.0..
...
Linking /home/runner/work/cabal/cabal/cabal-testsuite/PackageTests/NewBuild/CmdRun/Terminate/dist-newstyle/build/x86_64-linux/ghc-8.8.4/RunKill-1.0/x/exe/build/exe/exe ...
+ /home/runner/work/cabal/cabal/dist-newstyle-validate-ghc-8.8.4/build/x86_64-linux/ghc-8.8.4/cabal-install-3.9.0.0/x/cabal/build/cabal/cabal v2-run exe
...
about to sleep
done sleeping
exiting
cabal: waitForProcess: does not exist (No child processes)
terminated

stderr:
*** Exception: unexpected: done sleeping
CallStack (from HasCallStack):
  assertOutputDoesNotContain, called at PackageTests/NewBuild/CmdRun/Terminate/cabal.test.hs:35:3 in main:Main

*** unexpected failure for PackageTests/NewBuild/CmdRun/Terminate/cabal.test.hs
@ffaf1
Copy link
Collaborator

ffaf1 commented Aug 22, 2022

Judging from the ticket and the error line (34 vs. 35), the two runs are slightly different:

Up to date
terminated

vs.

about to sleep
done sleeping
exiting
cabal: waitForProcess: does not exist (No child processes)
terminated

@robx
Copy link
Collaborator

robx commented Aug 22, 2022

Thanks for catching this!

Judging from the ticket and the error line (34 vs. 35), the two runs are slightly different:

The test has changed in the meantime, so a changed output is to be expected. I do think the fix was good, and this is separate issue.

It would be good to know how often this happens, has it been observed more often than this once? It might be something as annoying as the write to disk taking more than a couple of seconds, or the controlling process randomly being paused for multiple seconds due to OS scheduling.

I think the best next step to narrow this down would be to instrument the test a bit with timestamped logging, unless this can be reproduced somewhat reliably locally.

@robx
Copy link
Collaborator

robx commented Aug 22, 2022

@andreasabel Do you have any info on how frequent this is?

robx added a commit to robx/cabal that referenced this issue Aug 22, 2022
We've seen some instability in the test, compare

  haskell#8416

This adds timestamped output to make it easier to
see what goes wrong in case the test fails again.
@andreasabel
Copy link
Member Author

@andreasabel Do you have any info on how frequent this is?

I just caught it and reported it, don't know how frequently it occurs.

@robx
Copy link
Collaborator

robx commented Aug 22, 2022

Ah good then, considering the "high priority" label I was worried that things might be on fire.

@andreasabel
Copy link
Member Author

I added "priority: high" because CI shouldn't fail (as this will stop the whole merge process...).

jneira pushed a commit to robx/cabal that referenced this issue Aug 24, 2022
We've seen some instability in the test, compare

  haskell#8416

This adds timestamped output to make it easier to
see what goes wrong in case the test fails again.
@alt-romes
Copy link
Collaborator

I haven't seen this test fail lately. Is there a way to grep CI for this failure?

I think this may no longer be relevant.

@andreasabel
Copy link
Member Author

Seen it 2024-04-12 in

@ulysses4ever
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants