bazel-bootstrap: FTBFS with default Java 21

Bug #2053202 reported by Vladimir Petko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bazel-bootstrap (Debian)
New
Unknown
bazel-bootstrap (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The package bazel-bootstrap ftbfs with default Java 21.
The relevant part of the build log:
---------------




SUBCOMMAND: # //src/main/java/com/google/devtools/build/lib/util:TestType [action 'Extracting interface //src/main/java/com/google/devtools/build/lib/util:TestType', configuration: 8aee65c478cb5b4e674207abffbf4c20bcf5833027a550949737dd2af7bfb65b, execution platform: //:default_host_platform]
(cd /tmp/bazel_Yw3wneGE/out/execroot/io_bazel && \
  exec env - \
    CCACHE_DISABLE=1 \
    CCACHE_TEMPDIR=/<<PKGBUILDDIR>>/debian/ccachetmp \
    LC_ALL=C \
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games \
  bazel-out/k8-opt-exec-EDC14992/bin/third_party/ijar/ijar bazel-out/k8-dbg/bin/src/main/java/com/google/devtools/build/lib/util/libTestType.jar bazel-out/k8-dbg/bin/src/main/java/com/google/devtools/build/lib/util/libTestType-ijar.jar --target_label //src/main/java/com/google/devtools/build/lib/util:TestType)
[291 / 1,677] 4 actions, 3 running
    //third_party/aws-sdk-auth-lite:aws-sdk-auth-lite; 1s local
    .../devtools/build/lib/rules/java:java-implicit-attributes; 0s local
    @googleapis//:google_rpc_code_proto; 0s local
    [Prepa] Extracting interface //.../google/devtools/build/lib/util:TestType





ERROR: /<<PKGBUILDDIR>>/src/main/java/com/google/devtools/build/lib/util/BUILD:181:13: Extracting interface //src/main/java/com/google/devtools/build/lib/util:TestType failed: (Segmentation fault): ijar failed: error executing command
  (cd /tmp/bazel_Yw3wneGE/out/execroot/io_bazel && \
  exec env - \
    CCACHE_DISABLE=1 \
    CCACHE_TEMPDIR=/<<PKGBUILDDIR>>/debian/ccachetmp \
    LC_ALL=C \
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games \
  bazel-out/k8-opt-exec-EDC14992/bin/third_party/ijar/ijar bazel-out/k8-dbg/bin/src/main/java/com/google/devtools/build/lib/util/libTestType.jar bazel-out/k8-dbg/bin/src/main/java/com/google/devtools/build/lib/util/libTestType-ijar.jar --target_label //src/main/java/com/google/devtools/build/lib/util:TestType)
Execution platform: //:default_host_platform
[292 / 1,677] 3 actions running
    //third_party/aws-sdk-auth-lite:aws-sdk-auth-lite; 1s local
    .../devtools/build/lib/rules/java:java-implicit-attributes; 0s local
    @googleapis//:google_rpc_code_proto; 0s local




Target //src:bazel_nojdk failed to build
[295 / 1,677] checking cached actions

INFO: Elapsed time: 40.264s, Critical Path: 23.22s
[295 / 1,677] checking cached actions

INFO: 295 processes: 40 internal, 255 local.
[295 / 1,677] checking cached actions

FAILED: Build did NOT complete successfully

FAILED: Build did NOT complete successfully

ERROR: Could not build Bazel
make[1]: *** [debian/rules:67: override_dh_auto_build] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:63: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

---------------

 The crash is caused by ijar encountering an unnamed method parameter entry:
#0 0x00005638318f5311 in devtools_ijar::Constant::slot() ()
#1 0x00005638318f99b1 in
devtools_ijar::MethodParametersAttribute::Write(unsigned char*&) ()
#2 0x00005638318fb021 in devtools_ijar::HasAttrs::WriteAttrs(unsigned
char*&) ()
#3 0x00005638318fa160 in devtools_ijar::Member::Write(unsigned char*&) ()
#4 0x00005638318fa614 in devtools_ijar::ClassFile::WriteBody(unsigned
char*&) ()
#5 0x00005638318fcb09 in devtools_ijar::ClassFile::WriteClass(unsigned
char*&) ()
#6 0x00005638318fcc9d in devtools_ijar::StripClass(unsigned char*&,
unsigned char const*, unsigned long) ()
#7 0x000056383190e192 in devtools_ijar::JarStripperProcessor::Process(char
const*, unsigned int, unsigned char const*, unsigned long) ()
#8 0x00005638319112dd in devtools_ijar::InputZipFile::ProcessFile(bool) ()
#9 0x0000563831910f39 in
devtools_ijar::InputZipFile::ProcessLocalFileEntry(unsigned long, unsigned
long) ()
#10 0x0000563831910bbb in devtools_ijar::InputZipFile::ProcessNext() ()
#11 0x0000563831911c52 in devtools_ijar::ZipExtractor::ProcessAll() ()
#12 0x000056383190ef22 in devtools_ijar::OpenFilesAndProcessJar(char
const*, char const*, bool, char const*, char const*) ()
#13 0x000056383190f5e1 in main ()

This is already fixed upstream[1].

[1] https://github.com/bazelbuild/bazel/commit/3954a18fa6b0e3d1a1005cc3409ebc95f6adf3af

Related branches

Changed in bazel-bootstrap (Debian):
status: Unknown → New
Revision history for this message
Vladimir Petko (vpa1977) wrote :

piuparts install/upgrade/purge (pass)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bazel-bootstrap - 4.2.3+ds-9ubuntu1

---------------
bazel-bootstrap (4.2.3+ds-9ubuntu1) noble; urgency=medium

  * d/p/handle_synthetic_method_parameters_that_dont_have_names.patch:
    apply upstream patch to resolve Java 21 ftbfs (LP: #2053202).

 -- Vladimir Petko <email address hidden> Fri, 05 Jan 2024 15:57:39 +1300

Changed in bazel-bootstrap (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.