Skip to content

[9.3.2] Fix linux-sandbox actions being killed prematurely when using virtual… - #32342

Merged
iancha1992 merged 1 commit into
bazelbuild:release-9.3.2from
iancha1992:cp32336
Nov 2, 2026
Merged

iancha1992 merged 1 commit into
bazelbuild:release-9.3.2from
iancha1992:cp32336

Conversation

@iancha1992

Copy link
Copy Markdown
Member

… threads (#31017)

This is a version of #29007 where the added test should pass for MacOS. The only change in this PR vs that PR is the location of true varies based on OS.

I think this should work, but I don't have a Mac handy to test this. If anyone has a Mac and can run bazel test //src/test/java/com/google/devtools/build/lib/shell:JavaSubprocessFactoryTest then that'd be much appreciated.

I forgot to account for the fact that MacOS places true at /usr/bin/true instead of /bin/true. This was the error during postsubmit from that test on MacOS:

1) createFromVirtualThreadForksOnPlatformThread(com.google.devtools.build.lib.shell.JavaSubprocessFactoryTest)
java.lang.AssertionError: Error running subprocess from virtual thread
	at com.google.devtools.build.lib.shell.JavaSubprocessFactoryTest.createFromVirtualThreadForksOnPlatformThread(JavaSubprocessFactoryTest.java:87)
	... 23 trimmed
Caused by: java.io.IOException: Cannot run program "/bin/true": Exec failed, error: 2 (No such file or directory)

Closes #31017.

PiperOrigin-RevId: 977850652
Change-Id: Ideba552c30cb0804c2e8722b31cbaf12c9beb077

Description

Motivation

Build API Changes

No

Checklist

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

Release Notes

RELNOTES: None

Commit feafed5

… threads (bazelbuild#31017)

This is a version of bazelbuild#29007 where the added test should pass for MacOS. The only change in this PR vs that PR is the location of `true` varies based on OS.

I think this should work, but I don't have a Mac handy to test this. If anyone has a Mac and can run `bazel test //src/test/java/com/google/devtools/build/lib/shell:JavaSubprocessFactoryTest` then that'd be much appreciated.

I forgot to account for the fact that MacOS places `true` at `/usr/bin/true` instead of `/bin/true`. This was the error during postsubmit from that test on MacOS:

```
1) createFromVirtualThreadForksOnPlatformThread(com.google.devtools.build.lib.shell.JavaSubprocessFactoryTest)
java.lang.AssertionError: Error running subprocess from virtual thread
	at com.google.devtools.build.lib.shell.JavaSubprocessFactoryTest.createFromVirtualThreadForksOnPlatformThread(JavaSubprocessFactoryTest.java:87)
	... 23 trimmed
Caused by: java.io.IOException: Cannot run program "/bin/true": Exec failed, error: 2 (No such file or directory)
```

Closes bazelbuild#31017.

PiperOrigin-RevId: 977850652
Change-Id: Ideba552c30cb0804c2e8722b31cbaf12c9beb077
@iancha1992 iancha1992 added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website awaiting-review PR is awaiting review from an assigned reviewer labels Nov 2, 2026
@iancha1992
iancha1992 requested a review from a team as a code owner November 2, 2026 17:03
@iancha1992
iancha1992 enabled auto-merge (squash) November 2, 2026 17:03
@iancha1992

Copy link
Copy Markdown
Member Author

@Wyverald @meteorcloudy @coeuvre

Cherry-pick of feafed5 (#31017) into release-9.3.2.

Conflict Resolution Note for Reviewers:

  • src/main/java/com/google/devtools/build/lib/shell/JavaSubprocessFactory.java: Resolved a minor import conflict by adding com.google.common.annotations.VisibleForTesting and com.google.common.base.Throwables while omitting com.google.common.base.Preconditions (which was present in the surrounding context on master but is not used in release-9.3.2).

@iancha1992
iancha1992 merged commit a10eb74 into bazelbuild:release-9.3.2 Nov 2, 2026
42 checks passed
@github-actions github-actions Bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants