-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Java crashes due to hsperfdata file conflicts across sandboxes #3236
Copy link
Copy link
Closed
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)team-Local-ExecIssues and PRs for the Execution (Local) teamIssues and PRs for the Execution (Local) teamtype: bug
Description
Running bazel build on a fat java/scala project (several thousands of targets) fails when working on linux debian with user namespace enabled.
Issue
Trying to run bazel build with user namespace enabled:
$ sysctl kernel.unprivileged_userns_clone=1
The build runs alright but at some point it crashes with weird memory issue:
ERROR: <target-path>/BUILD:35:1: error executing shell command: '
rm -rf bazel-out/local-fastbuild/bin/<package>/<target>.jar_temp_resources_dir
set -e
mkdir -p bazel-out/local-fastbuild/bin/<target>' failed: Process terminated by signal 6 [sandboxed].
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0x7) at pc=0x00007f094606874b, pid=5, tid=0x00007f09472e0700
#
# JRE version: (8.0_131-b11) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.131-b11 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x96874b] PerfMemory::alloc(unsigned long)+0x7b
#
# Core dump written. Default location: /home/builduser/.cache/bazel/_bazel_builduser/bc0e462ab01ac9379d22ad058ca1cb1f/bazel-sandbox/4864102460254154064/execroot/__main__/core or core.5
#
# An error report file with more information is saved as:
# /home/builduser/.cache/bazel/_bazel_builduser/bc0e462ab01ac9379d22ad058ca1cb1f/bazel-sandbox/4864102460254154064/execroot/__main__/hs_err_pid5.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Environment info
The machine is docker container based on debian image
$ uname -a
Linux 167-docker99 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux
builduser@167-docker99:~/ws/bazel-port-isolation$ cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"Bazel version
- The project is fat (several thousands of java / scala targets)
- Bazel was built from a81264e
- rules_scala - wix-incubator/rules_scala@d66c9d7 (basically bazel-contrib/rules_scala@5d6ff51 with small changes around
specs2versions and test runner env preparation)
additional information
- issue does not happen when
unprivileged_userns_clone=0(but clearly - that's not a solution) - with user namespace enabled, bazel 0.5.1 showed this issue . May also be related to Bazel HEAD build fails on Ubuntu 16.04.2 LTS VirtualBox VM #3064 .
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)team-Local-ExecIssues and PRs for the Execution (Local) teamIssues and PRs for the Execution (Local) teamtype: bug