Windows: failed to delete output files before executing action (.dll)
See original GitHub issueDescription of the problem / feature request:
When compiling on Windows, sometimes .dll cannot be deleted. The typical error message is: " xx.dll: failed to delete output files before executing action"
I am using remote_cache with remote_download_minimal, and it seems those items that actually are left in the local cache, sometimes cannot be deleted.
Manually you can delete the .dlls just fine, so a workaround for now is to search the local cache for .dlls and delete them before server side compilation.
I have previously seen problems when defender or anti-virus is temporarily locking files. However this failure is permanent: Bazel cannot delete the files, the user can.
Feature requests: what underlying problem are you trying to solve with this feature?
- Get a better error message when this error occurs (permission, read error etc).
- Create a more stable way to delete files on windows (retry?, unlocking?)
Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
It is sporadic, but probably connected to remote_cache
What operating system are you running Bazel on?
Windows 10
What’s the output of bazel info release
?
1.2.0
Have you found anything relevant by searching the web?
Nothing
Any other information, logs, or outputs that you want to share?
No.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
neovim - Choco Can not delete output file : Access is denied
If you have 'Access Denied' for .dll or .exe files be sure that you're not running the application that uses these files.
Read more >Deleting .dll Files?? - Microsoft Community
To do this, right-click > go to Properties > Security > select Administrators > see if Full control is checked. If it is,...
Read more >How to Delete DLL Files: 14 Steps (with Pictures) - wikiHow
1. Boot your Windows PC into Safe Mode. This ensures that if you have an unwanted app, such as spyware, that relies on...
Read more >The Action Cannot Be Completed Because the File is Open: Fix
Read on to see how to delete a file when you get the action cannot be completed because the file is open in...
Read more >Command-Line Reference | Bazel
Bazel will still be unable to parse the file 'external/BUILD', ... default: "": Add or remove keys from an action's execution info based...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is there any update on this issue? I’m still facing the same issue on Bazel 4.1.0 on Windows 10.
I just encountered this bug on a Windows machine in GitHub Actions while building a jar file that does not contain any native code.