Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JVM11 crashes during bazel build (never crashed with JVM8) #11401

Closed
vam-google opened this issue May 14, 2020 · 2 comments
Closed

JVM11 crashes during bazel build (never crashed with JVM8) #11401

vam-google opened this issue May 14, 2020 · 2 comments
Labels
area-EngProd Bazel CI, infrastructure, bootstrapping, release, and distribution tooling team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website untriaged

Comments

@vam-google
Copy link
Collaborator

vam-google commented May 14, 2020

Description of the problem / feature request:

bazel build fails sporadically with JVM crash on Kokoro instance (Ubuntu 16.04) for googleapis repository CI builds (owned and maintained by Google). Most often it fails on java_proto_library target build.

The heavier the build the more likely it is to fail. Currently reproducible on the n1-standard-64 GCE instance (64 vCPUs, 240 GB). Typical build time on this machine is 10 minutes.

The machine has 240GB ram, the JVM failures are not always about memory (see below for the log snippet). I'm not sure if it has anything to do with memory issues/leaks.

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

It fails sporadically, but the fails started only after switching to JDK11 (the one bazel downloads from remote source). When bazel was using JDK8 for its builds there wasn't a single failure like this.

What operating system are you running Bazel on?

Ubuntu 16.04, standard Kokoro instance.

What's the output of bazel info release?

release 3.0.0

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

https://github.com/googleapis/googleapis.git
1b8b77db10a0bd0ff47a4259ae9804b6237bc1c7

Have you found anything relevant by searching the web?

I could not find anything relevant.

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

ERROR: /tmpfs/src/github/googleapis/google/cloud/bigquery/connection/v1beta1/BUILD.bazel:12:1: Couldn't build file google/cloud/bigquery/connection/v1beta1/libconnection_proto-speed-hjar.jar: Compiling Java headers google/cloud/bigquery/connection/v1beta1/libconnection_proto-speed-hjar.jar (1 source jar) failed (Aborted): java failed: error executing command external/remotejdk11_linux/bin/java -Xverify:none -XX:+UseParallelOldGC -XX:-CompactStrings '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' ... (remaining 47 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox java failed: error executing command external/remotejdk11_linux/bin/java -Xverify:none -XX:+UseParallelOldGC -XX:-CompactStrings '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' ... (remaining 47 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0x00007f752d9d13b9, pid=2, tid=3
#
# JRE version:  (11.0.6+10) (build )
# Java VM: OpenJDK 64-Bit Server VM (11.0.6+10-LTS, mixed mode, tiered, compressed oops, parallel gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xc633b9]  PerfMemory::alloc(unsigned long)+0x59
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /tmpfs/tools/bazel_root/586020c997d340d7957ffe3ab7890b94/sandbox/linux-sandbox/8752/execroot/com_google_googleapis/core.2)
#
# An error report file with more information is saved as:
# /tmpfs/tools/bazel_root/586020c997d340d7957ffe3ab7890b94/sandbox/linux-sandbox/8752/execroot/com_google_googleapis/hs_err_pid2.log
#
# If you would like to submit a bug report, please visit:
#   http://www.azulsystems.com/support/
#
@jin jin added area-EngProd Bazel CI, infrastructure, bootstrapping, release, and distribution tooling untriaged labels May 15, 2020
@jin
Copy link
Member

jin commented May 15, 2020

FYI @philwo, @fweikert

@philwo
Copy link
Member

philwo commented May 15, 2020

This is a duplicate of #3236.

Please use the flag --sandbox_tmpfs_path=/tmp to solve this. We hope to be able to remove the need for this flag in the future, but for now this flag is the solution.

@philwo philwo closed this as completed May 15, 2020
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
lucamilanesio added a commit to GerritCodeReview/gerrit-ci-scripts that referenced this issue Sep 13, 2023
The switch to Java-11 has brought instability in Bazel
execution and random crashes (see [1]).
Bazel doesn't have a fix at the moment, the only
workaround is to add the --sandbox_tmpfs_path=/tmp
option to every build.

[1] bazelbuild/bazel#11401

Change-Id: I54a6e22ae76a181e38232e04c204d5fdee9927d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-EngProd Bazel CI, infrastructure, bootstrapping, release, and distribution tooling team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website untriaged
Projects
None yet
Development

No branches or pull requests

3 participants