-
Notifications
You must be signed in to change notification settings - Fork 337
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
test/Succeed/ForeignPragma
has CI glitches
#6739
Comments
Maybe GHC chokes when it is operating concurrently on the same files. I found a function that could be involved in the case: withAtomicRename :: (MonadIO m) => FilePath -> (FilePath -> m a) -> m a
withAtomicRename targetFile f = do
-- The temp file must be on the same file system (mount) as the target file
-- to result in an atomic move on most platforms.
-- The standard way to ensure that is to place it into the same directory.
-- This can still be fooled when somebody mounts a different file system
-- at just the right time, but that is not a case we aim to cover here.
let temp = targetFile <.> "tmp"
res <- f temp
liftIO $ renameFile temp targetFile
return res The name says "atomic", but nothing is atomic here. GHCs running in parallel could both try to I filed a question to GHC: |
Maybe a cause for #6739 was that the check was for `--compile` only but the `.flags` files in `test/Succeed` also used `-c`. This commit updates the check and prevents it from bitrotting.
The GHC developers answered that our concurrent use of GHC on the same file is problematic. Maybe such concurrent use was never intended by the testsuite and just crept in there: in that case, it could be fixed by Optimistically closing... |
Maybe a cause for agda#6739 was that the check was for `--compile` only but the `.flags` files in `test/Succeed` also used `-c`. This commit updates the check and prevents it from bitrotting.
This glitch is still existing for other testcases: https://github.com/agda/agda/actions/runs/9093876160/job/24994686520#step:10:36 |
Hopefully fixes #6739 (time will tell as races only show up sometimes).
Hopefully fixes #6739 (time will tell as races only show up sometimes).
https://github.com/agda/agda/actions/runs/5645321781/job/15291549031?pr=6738#step:10:38
Also:
The text was updated successfully, but these errors were encountered: