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

Error: The process cannot access the file because it is being used by another process #9587

Open
newhoggy opened this issue Jan 5, 2024 · 1 comment

Comments

@newhoggy
Copy link

newhoggy commented Jan 5, 2024

Describe the bug
When compiling on Windows:

The following error occurs:

Installing library in C:\cabal\store\ghc-9.2.8\incoming\new-3144\cabal\store\ghc-9.2.8\bytestring-bu_-0.10.8._-b8a4e372acfcff40320e5e31ea22798d79297bbd\lib
D:\a\cardano-node\cardano-node\dist-newstyle\tmp\src-3144\bytestring-builder-0.10.8.2.0\bytestring-builder.cabal: removeDirectoryRecursive:removeContentsRecursive:removePathRecursive:removeContentsRecursive:removePathRecursive:DeleteFile "\\\\?\\D:\\a\\cardano-node\\cardano-node\\dist-newstyle\\tmp\\src-3144\\bytestring-builder-0.10.8.2.0\\bytestring-builder.cabal": permission denied (The process cannot access the file because it is being used by another process.)

To Reproduce
This is reproducible in Github Actions:

https://github.com/IntersectMBO/cardano-node/actions/runs/7418459148/job/20186416497?pr=5624

Expected behavior
Either the files are opened without an exclusive lock, or the file is closed in a timely manner or the file deletion is retried until the file is unlocked. Whichever way cabal should never fail with this error.

System information

  • Windows
  • cabal-3.10.2.0
  • ghc-8.2.8

Additional context
Add any other context about the problem here.

@gbaz
Copy link
Collaborator

gbaz commented Jan 5, 2024

this is i believe the removeDirectoryRecursive issue on which see more here #7240 and here haskell/directory#129

I'm of the opinion that the directory maintainers need to iterate to a solution they're happy with, and we shouldn't be putting in ad-hoc workarounds downstream.

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

3 participants