Windows: failed to delete output files before executing action (.dll)
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### Description 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?
1. Get a better error message when this error occurs (permission, read error etc).
2. 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.
Contributor guide
Research direction
The issue names no source file or test. Start by investigating the Windows 10 build path involving remote_cache and remote_download_minimal, using the sporadic .dll deletion failure as the reproduction target. Done means the failure can be reproduced or characterized and the resulting error identifies whether permission, read, or file-locking behavior is involved.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100