Bazel 8.0.0 crashes on windows: Unrecoverable error while evaluating node, java.nio.file.AccessDeniedException
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the bug:
We are seeing this error approx 10-15 times per day in our CI system with bazel 8.0.0. It is for a different DLL each time. Every time it is the same java.nio.file.AccessDeniedException. Rerunning the build command typically succeeds.
```
[391,431 / 405,569] checking cached actions
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.RuntimeException: Unrecoverable error while evaluating node 'ActionLookupDataN{actionLookupKey=ConfiguredTargetKey{label=//src/path/to:target, config=BuildConfigurationKey[9cfe96a447c6024399e3d957765b4a9c50e92c7d30e8113fa769583f44a41f7f]}, actionIndex=1989}' (requested by nodes 'ArtifactNestedSetKey[210]@660341467')
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:547)
at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:435)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: java.nio.file.AccessDeniedException: D:\udu\b\mor466oi\execroot\_main\bazel-out\x64_windows-opt\bin\src\path\to\libxy.dll
at com.google.devtools.build.lib.vfs.JavaIoFileSystem.statIfFound(JavaIoFileSystem.java:519)
at com.google.devtools.build.lib.vfs.Path.statIfFound(Path.java:320)
at com.google.devtools.build.lib.remote.RemoteActionFileSystem.statInternal(RemoteActionFileSystem.java:658)
at com.google.devtools.build.lib.remote.RemoteActionFileSystem.statIfFound(RemoteActionFileSystem.java:598)
at com.google.devtools.build.lib.vfs.Path.statIfFound(Path.java:320)
at com.google.devtools.build.lib.skyframe.ActionOutputMetadataStore.fileArtifactValueFromArtifact(ActionOutputMetadataStore.java:588)
at com.google.devtools.build.lib.skyframe.ActionOutputMetadataStore.constructFileArtifactValue(ActionOutputMetadataStore.java:450)
at com.google.devtools.build.lib.skyframe.ActionOutputMetadataStore.constructFileArtifactValueFromFilesystem(ActionOutputMetadataStore.java:438)
at com.google.devtools.build.lib.skyframe.ActionOutputMetadataStore.getOutputMetadata(ActionOutputMetadataStore.java:235)
at com.google.devtools.build.lib.actions.ActionCacheChecker.getOutputMetadataOrConstant(ActionCacheChecker.java:667)
at com.google.devtools.build.lib.actions.ActionCacheChecker.getOutputMetadataMaybe(ActionCacheChecker.java:694)
at com.google.devtools.build.lib.actions.ActionCacheChecker.validateArtifacts(ActionCacheChecker.java:223)
at com.google.devtools.build.lib.actions.ActionCacheChecker.mustExecute(ActionCacheChecker.java:621)
at com.google.devtools.build.lib.actions.ActionCacheChecker.getTokenIfNeedToExecute(ActionCacheChecker.java:554)
at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.checkActionCache(SkyframeActionExecutor.java:677)
at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:854)
at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.computeInternal(ActionExecutionFunction.java:375)
at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:216)
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:467)
... 7 more
Caused by: java.nio.file.AccessDeniedException: D:\udu\b\mor466oi\execroot\_main\bazel-out\x64_windows-opt\bin\src\path\to\libxy.dll
at com.google.devtools.build.lib.windows.WindowsFileOperations.getLastChangeTime(WindowsFileOperations.java:166)
at com.google.devtools.build.lib.windows.WindowsFileSystem.stat(WindowsFileSystem.java:155)
at com.google.devtools.build.lib.vfs.JavaIoFileSystem.statIfFound(JavaIoFileSystem.java:509)
```
### Which category does this issue belong to?
Core
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
_No response_
### Which operating system are you running Bazel on?
Windows Server 2022 Standard
### What is the output of `bazel info release`?
8.0.0
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
_No response_
### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
_No response_
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start with the stack trace and inspect JavaIoFileSystem.java, WindowsFileOperations.java, WindowsFileSystem.java, and RemoteActionFileSystem.java. Reproduce on Windows Server 2022 with Bazel 8.0.0, focusing on the intermittent AccessDeniedException while checking cached DLL outputs. Done means the failure is reproducible and its handling is covered by an appropriate regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- 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