-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Description of the bug:
I apologize in advance, I've found another weird Windows remote execution bug.
When using Windows remote execution, I'm seeing bazel test invocations fail with messages like:
ERROR: C:/actionsrunner/_work/engflow/engflow/test/java/com/engflow/re/integration/auth/BUILD:1:10: Testing //test/java/com/engflow/re/integration/auth:auth failed: java.io.IOException: C:/_b/bpc5uood/execroot/engflow/bazel-out/x64_windows-opt/testlogs/test/java/com/engflow/re/integration/auth/auth/test.err (Permission denied)
The test is actually failing remotely, but Bazel shouldn't crash. It also fails to complete its BES stream, which is frustrating but not the main issue.
From the message, I'd guess Bazel is opening the file, then attempting to delete it.
The test.err file exists, is owned by BUILTIN/Administrators, and has no special ACLs. No other processes have it open after bazel test exits. It can be deleted manually. I think the path comes from TestRunnerAction.java. Its purpose seems to be to hold stderr from tests, however, that's not what's happening here.
The thing that triggers this is a new remote execution feature where we populate the ExecuteResponse.message field. The contents of the test.err file match the string that the server puts in that field.
Which category does this issue belong to?
Remote Execution
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
- Write a test that fails. I've mainly seen this in Java tests, but I don't believe it's language specific.
- Run the test from a Windows client on a Windows remote execution service that populates the
ExecuteResponse.messagefield.
(Sorry I realize this isn't going to be easy for anyone else. It reproduces 100% for me though, so if you have code pointers or debugging suggestions, I'll help as much as I can).
Which operating system are you running Bazel on?
Windows Server 2022 / x86_64
What is the output of bazel info release?
release 8.0.0-pre.20231030.2
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
n/a
What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?
n/a
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
n/a