Skip to content

Cherry-pick https://github.com/bazelbuild/bazel/commit/47696c94cac862ff80ece3873f4162f5815c7a32 #14701

@blorente

Description

@blorente

Description of the problem / feature request:

Please cherry-pick 47696c9 into the next 5.x release.

Feature requests: what underlying problem are you trying to solve with this feature?

The current 5.0 release calls some native interfaces to get pids that are not present in Apple Silicon machines with our current JDK. That commit files the issue.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Unfortunately, this reproduces with our internal JDK only. But we have validated that this commit fixes it.

What operating system are you running Bazel on?

macOS, in an M1 machine, with a custom JDK.

What's the output of bazel info release?

Both 5.0 and 4.2.2 repro this. In fact, every release up to (and including) 6.0.0-pre.20211110.1 reproduce it.

Any other information, logs, or outputs that you want to share?

Running bazel in the bazelbuild/examples repository, in cpp-tutorial/stage1, gives the following result:

INFO: Invocation ID: afc878b9-7dbf-4a07-a6a5-334406f5c07c
INFO: Analyzed target //main:hello-world (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //main:hello-world up-to-date:
  bazel-bin/main/hello-world
INFO: Elapsed time: 0.424s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.RuntimeException: Unexpected Exception ''int com.google.devtools.build.lib.unix.ProcessUtils.getpid()'' when closing BEP transports, this is a bug.
        at com.google.devtools.build.lib.buildeventservice.BuildEventServiceModule.waitForBuildEventTransportsToClose(BuildEventServiceModule.java:490)
        at com.google.devtools.build.lib.buildeventservice.BuildEventServiceModule.closeBepTransports(BuildEventServiceModule.java:566)
        at com.google.devtools.build.lib.buildeventservice.BuildEventServiceModule.afterCommand(BuildEventServiceModule.java:581)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions