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

Riscv64 Fedora : Target //src:bazel_nojdk failed to build #19388

Open
CoolKingYY opened this issue Sep 1, 2023 · 3 comments
Open

Riscv64 Fedora : Target //src:bazel_nojdk failed to build #19388

CoolKingYY opened this issue Sep 1, 2023 · 3 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: bug

Comments

@CoolKingYY
Copy link

CoolKingYY commented Sep 1, 2023

Description of the bug:

ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/packages/BUILD:28:13: Building src/main/java/com/google/devtools/build/lib/packages/libglobber.jar (1 source file) failed: Worker process did not return a WorkResponse:

---8<---8<--- Start of log, file at /tmp/bazel_X8eA4OhG/out/bazel-workers/multiplex-worker-3-Javac.log ---8<---8<--- OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM ---8<---8<--- End of log ---8<---8<--- ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec/BUILD:56:13: Building src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec/libserialization-processor-util.jar (1 source file) [for tool] failed: Worker process did not return a WorkResponse:

---8<---8<--- Start of log, file at /tmp/bazel_X8eA4OhG/out/bazel-workers/multiplex-worker-3-Javac.log ---8<---8<--- OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM ---8<---8<--- End of log ---8<---8<--- ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/concurrent/BUILD:22:13: Building src/main/java/com/google/devtools/build/lib/concurrent/libthread_safety.jar (1 source file) failed: Worker process did not return a WorkResponse:

---8<---8<--- Start of log, file at /tmp/bazel_X8eA4OhG/out/bazel-workers/multiplex-worker-3-Javac.log ---8<---8<--- OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM ---8<---8<--- End of log ---8<---8<--- ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec/BUILD:81:13: Building src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec/libautocodec-annotation.jar (1 source file) [for tool] failed: Worker process did not return a WorkResponse:

---8<---8<--- Start of log, file at /tmp/bazel_X8eA4OhG/out/bazel-workers/multiplex-worker-3-Javac.log ---8<---8<--- OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM ---8<---8<--- End of log ---8<---8<--- ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/util/BUILD:25:13: Building src/main/java/com/google/devtools/build/lib/util/libvar_int.jar (1 source file) failed: Worker process did not return a WorkResponse:

---8<---8<--- Start of log, file at /tmp/bazel_X8eA4OhG/out/bazel-workers/multiplex-worker-3-Javac.log ---8<---8<--- OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM ---8<---8<--- End of log ---8<---8<--- ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/cmdline/BUILD:88:13: Building src/main/java/com/google/devtools/build/lib/cmdline/libLabelValidator.jar (1 source file) failed: Worker process did not return a WorkResponse:

---8<---8<--- Start of log, file at /tmp/bazel_X8eA4OhG/out/bazel-workers/multiplex-worker-3-Javac.log ---8<---8<--- OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM ---8<---8<--- End of log ---8<---8<--- ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/util/BUILD:32:13: Building src/main/java/com/google/devtools/build/lib/util/libos.jar (1 source file) failed: Worker process did not return a WorkResponse:

---8<---8<--- Start of log, file at /tmp/bazel_X8eA4OhG/out/bazel-workers/multiplex-worker-3-Javac.log ---8<---8<--- OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM ---8<---8<--- End of log ---8<---8<--- ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/skyframe/serialization/BUILD:14:13: Building src/main/java/com/google/devtools/build/lib/skyframe/serialization/libcodec-scanning-constants.jar (1 source file) failed: Worker process did not return a WorkResponse:

---8<---8<--- Start of log, file at /tmp/bazel_X8eA4OhG/out/bazel-workers/multiplex-worker-3-Javac.log ---8<---8<--- OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM ---8<---8<--- End of log ---8<---8<---

Target //src:bazel_nojdk failed to build INFO: Elapsed time: 9380.871s, Critical Path: 6821.65s INFO: 1961 processes: 391 internal, 1570 local. FAILED: Build did NOT complete successfully

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.

Sorry, for some reason I can't provide a fedora image of my riscv64 architecture.

$ mkdir bazel && wget https://github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-dist.zip
$ cd bazel
$ unzip bazel-6.3.2-dist.zip
$ vim ./tools/build_rules/java_rules_skylark.bzl
 
 if ctx.files.srcs or ctx.files.srcjars:
        cmd += "%s/bin/javac" % java_runtime.java_home
        cmd += " " + " ".join(javac_options)
+     cmd += " -J-Xmx30g "
        if compile_time_jars:
"tools/build_rules/java_rules_skylark.bzl" 296L, 10480B                                                                               71,24         20%

$ export BAZEL_JAVAC_OPTS="-J-Xmx30g"
$ env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=local_jdk --javacopt=-J-Xmx30g" bash ./compile.sh

Which operating system are you running Bazel on?

Linux fedora-riscv 6.1.42 #1 SMP Fri Aug 18 02:30:30 CST 2023 riscv64 GNU/Linux

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

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

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

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

JAVA VERSION

[fedora@fedora-riscv bazel]$ java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment 18.9 (build 11.0.11+9)
OpenJDK 64-Bit Zero VM 18.9 (build 11.0.11+9, interpreted mode)
[fedora@fedora-riscv bazel]$ javac -version
javac 11.0.11
[fedora@fedora-riscv bazel]$

GCC VERSION

[fedora@fedora-riscv bazel]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/riscv64-redhat-linux/12/lto-wrapper
Target: riscv64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-12.2.1-20221121/obj-riscv64-redhat-linux/isl-install --enable-gnu-indirect-function --with-arch=rv64gc --with-abi=lp64d --with-multilib-list=lp64d --build=riscv64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.1 20221121 (Red Hat 12.2.1-4) (GCC)

Other information

I tried compiling in version 6.0.0 and still reproduced the same error on my machine

@CoolKingYY
Copy link
Author

CoolKingYY commented Sep 5, 2023

I added --strategy=Javac=standalone to the command line and got the following output:

......
ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/windows/BUILD:24:13: 
Building src/main/java/com/google/devtools/build/lib/wis/libwindows_short_path.jar (1 source file) failed:
 (Aborted): java failed: error executing command (from target //src/main/java/com/google/devtools/buiib/windows:windows_short_path)
 (cd /tmp/bazel_kvRvaDME/out/execroot/io_bazel && \
  exec env - \
    LC_CTYPE=en_US.UTF-8 \
    PATH=/home/fedora/.local/bin:/home/fedora/bin:/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin \
  external/local_jdk/bin/java -Xmx512m -XX:+TieredCompilation '-XX:TieredStopAtLevel=1' -jar bazel-out/riscv64-opt-exec-EDC14992/bin/src/java_tools/buil/java/com/google/devtools/build/buildjar/bootstrap_VanillaJavaBuilder_deploy.jar @bazel-out/riscv64-opt/bin/src/main/java/com/google/devtools/build/lib/ows/libwindows_short_path.jar-0.params @bazel-out/riscv64-opt/bin/src/main/java/com/google/devtools/build/lib/windows/libwindows_short_path.jar-1.params
# Configuration: 55d08faa7c78299b516fbd76ba2440660134e401bda9747a11e7335ef133031f
# Execution platform: //:default_host_platform
OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (sharedRuntime_zero.cpp:80), pid=11909, tid=11915
#  Error: ShouldNotCall()
#
# JRE version: OpenJDK Runtime Environment 18.9 (11.0.11+9) (build 11.0.11+9)
# Java VM: OpenJDK 64-Bit Zero VM 18.9 (11.0.11+9, mixed mode, serial gc, linux-riscv64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /bazel_kvRvaDME/out/execroot/io_bazel/core.11909)
#
# An error report file with more information is saved as:
# /tmp/bazel_kvRvaDME/out/execroot/io_bazel/hs_err_pid11909.log
#
# If you would like to submit a bug report, please visit:
#   https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=java-11-openjdk&version=33
#
......
ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/actions/BUILD:319:13: Building src/main/java/com/google/devtools/build/lib/ans/libmiddleman_type.jar (1 source file) failed: (Aborted): java failed: error executing command (from target //src/main/java/com/google/devtools/build/actions:middleman_type)
......
ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/skyframe/serialization/BUILD:14:13: Building src/main/java/com/google/devtoouild/lib/skyframe/serialization/libcodec-scanning-constants.jar (1 source file) [for tool] failed: (Aborted): java failed: error executing command (fromget //src/main/java/com/google/devtools/build/lib/skyframe/serialization:codec-scanning-constants)
......
ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/util/BUILD:266:13: Building src/main/java/com/google/devtools/build/lib/utilexit_code.jar (1 source file) failed: (Aborted): java failed: error executing command (from target //src/main/java/com/google/devtools/build/lib/util:exode)
......
ERROR: /home/fedora/bazel-6.0.0/src/main/java/net/starlark/java/annot/BUILD:19:13: Building src/main/java/net/starlark/java/annot/libannot_sans_processor (5 source files) failed: (Aborted): java failed: error executing command (from target //src/main/java/net/starlark/java/annot:annot_sans_processor)
......
ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/unix/BUILD:32:13: Building src/main/java/com/google/devtools/build/lib/unix/rocmeminfo_parser.jar (1 source file) failed: (Aborted): java failed: error executing command (from target //src/main/java/com/google/devtools/build/libx:procmeminfo_parser)
......
ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec/BUILD:56:13: Building src/main/java/com/goodevtools/build/lib/skyframe/serialization/autocodec/libserialization-processor-util.jar (1 source file) [for tool] failed: (Aborted): java failed: errorcuting command (from target //src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec:serialization-processor-util)
......
ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/actions/BUILD:239:13: Building src/main/java/com/google/devtools/build/lib/ans/libcommandline_item.jar (2 source files) failed: (Aborted): java failed: error executing command (from target //src/main/java/com/google/devtools/buiib/actions:commandline_item)
......
ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/analysis/BUILD:1174:13: Building src/main/java/com/google/devtools/build/liblysis/libtransitive_info_provider.jar (1 source file) failed: (Aborted): java failed: error executing command (from target //src/main/java/com/google/dels/build/lib/analysis:transitive_info_provider)
......
ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/collect/BUILD:11:13: Building src/main/java/com/google/devtools/build/lib/cot/libextrema.jar (1 source file) failed: (Aborted): java failed: error executing command (from target //src/main/java/com/google/devtools/build/lib/collextrema)
......

ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/common/options/BUILD:39:13: Building src/main/java/com/google/devtools/common/options/ptions_internal.jar (35 source files) and running annotation processors (AutoAnnotationProcessor, AutoValueProcessor) [for tool] failed: (Aborted): javaled: error executing command (from target //src/main/java/com/google/devtools/common/options:options_internal)
......
ERROR: /home/fedora/bazel-6.0.0/src/main/java/com/google/devtools/build/lib/util/BUILD:278:13: Building src/main/java/com/google/devtools/build/lib/utilcustom_exit_code_publisher.jar (1 source file) failed: (Aborted): java failed: error executing command (from target //src/main/java/com/google/devtools/d/lib/util:custom_exit_code_publisher)
  (cd /tmp/bazel_kvRvaDME/out/execroot/io_bazel && \
  exec env - \
    LC_CTYPE=en_US.UTF-8 \
    PATH=/home/fedora/.local/bin:/home/fedora/bin:/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin \
  external/local_jdk/bin/java -Xmx512m -XX:+TieredCompilation '-XX:TieredStopAtLevel=1' -jar bazel-out/riscv64-opt-exec-EDC14992/bin/src/java_tools/buil/java/com/google/devtools/build/buildjar/bootstrap_VanillaJavaBuilder_deploy.jar @bazel-out/riscv64-opt/bin/src/main/java/com/google/devtools/build/lib//libcustom_exit_code_publisher.jar-0.params @bazel-out/riscv64-opt/bin/src/main/java/com/google/devtools/build/lib/util/libcustom_exit_code_publisher.japarams)
# Configuration: 55d08faa7c78299b516fbd76ba2440660134e401bda9747a11e7335ef133031f
# Execution platform: //:default_host_platform
OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (sharedRuntime_zero.cpp:80), pid=11948, tid=11961
#  Error: ShouldNotCall()
#
# JRE version: OpenJDK Runtime Environment 18.9 (11.0.11+9) (build 11.0.11+9)
# Java VM: OpenJDK 64-Bit Zero VM 18.9 (11.0.11+9, mixed mode, serial gc, linux-riscv64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /bazel_kvRvaDME/out/execroot/io_bazel/core.11948)
#
# An error report file with more information is saved as:
# /tmp/bazel_kvRvaDME/out/execroot/io_bazel/hs_err_pid11948.log
#
# If you would like to submit a bug report, please visit:
#   https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=java-11-openjdk&version=33
#
Target //src:bazel_nojdk failed to build
INFO: Elapsed time: 9539.980s, Critical Path: 6953.48s
INFO: 1961 processes: 391 internal, 1570 local.

@zhengwei143 zhengwei143 added team-Rules-Java Issues for Java rules and removed team-Remote-Exec Issues and PRs for the Execution (Remote) team labels Sep 5, 2023
@Wyverald
Copy link
Member

Wyverald commented Sep 5, 2023

OpenJDK 64-Bit Zero VM warning: -XX:+TieredCompilation not supported in this VM
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (sharedRuntime_zero.cpp:80), pid=11909, tid=11915
#  Error: ShouldNotCall()
#
# JRE version: OpenJDK Runtime Environment 18.9 (11.0.11+9) (build 11.0.11+9)
# Java VM: OpenJDK 64-Bit Zero VM 18.9 (11.0.11+9, mixed mode, serial gc, linux-riscv64)
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /bazel_kvRvaDME/out/execroot/io_bazel/core.11909)
#
# An error report file with more information is saved as:
# /tmp/bazel_kvRvaDME/out/execroot/io_bazel/hs_err_pid11909.log
#
# If you would like to submit a bug report, please visit:
#   https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=java-11-openjdk&version=33
#

I would suggest following that advice and filing a bug report with RedHat, not Bazel.

@hvadehra
Copy link
Member

Yeah, the jvm crash isn't a bazel issue, least of all an issue with the java rules. That being said, perhaps there is something we can change to avoid running into this. But without being able to reproduce this, I'm afraid there probably isn't much we can do.

@hvadehra hvadehra added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed team-Rules-Java Issues for Java rules untriaged labels Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: bug
Projects
None yet
Development

No branches or pull requests

7 participants