spurious crashes when compiling openjdk-21 in focal

Bug #2044899 reported by Vladimir Petko
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-9 (Ubuntu)
New
Undecided
Unassigned

Bug Description

When compiling openjdk-21 in focal on risc-V, the gcc compiler spuriously crashes with SIGSEGV.
The crash happens with different files, and running the failing command in isolation succeeds.

The failing build logs[1].

The crash can be reproduced locally in RISC-V vm:
---
riscv64-linux-gnu-g++-9: internal compiler error: Segmentation fault signal terminated program cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
---
It has the following backtrace:

#0 0x0000000000a77d1a in linemap_lookup(line_maps*, unsigned int) ()

#1 0x0000000000a78370 in linemap_resolve_location(line_maps, unsigned int, location_resolution_kind, line_map_ordinary const*) ()
Backtrace stopped: frame did not save the PC

[1]https://launchpadlibrarian.net/699320896/buildlog_ubuntu-focal-riscv64.openjdk-21_21.0.1+12-2~20.04_BUILDING.txt.gz

Note: the build succeeds when build with -security pocket only

Revision history for this message
Vladimir Petko (vpa1977) wrote :

coredump from the failing build

Revision history for this message
Vladimir Petko (vpa1977) wrote :

sample failing command

description: updated
Revision history for this message
Vladimir Petko (vpa1977) wrote :

SIGSEGV crash in a different place

description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Vladimir, or anyone else affected,

Accepted openjdk-21 into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openjdk-21/21.0.1+12-2~20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-focal
Revision history for this message
Vladimir Petko (vpa1977) wrote (last edit ):

Marking as verification done, due to the error in the changelog (bug referenced as LP: XXXXX instead of launchpad bug XXXXX).

This bug is in new state.
To workaround the issue openjdk-21 is compiled with gcc-10 in focal.

tags: removed: verification-needed verification-needed-focal
tags: added: verification-done verification-done-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

To be clear the changelog referenced it as LP: #2044899 which then made the bug a part of the SRU process. To have the bug not be included you could use LP #2044899 or just launchpad bug 2044899 as you mentioned.

Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for openjdk-21 has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote (last edit ):
Download full text (3.5 KiB)

g++ seems to have segfaulted whild building openjdk-lts (openjdk-11) on focal/riscv-64 (precisely, while running a hotspot test):

========================================================================================

( /bin/rm -f /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/gtest/objs/test_align.o.log && /usr/bin/riscv64-linux-gnu-g++-9 -MMD -MF /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/gtest/objs/test_align.d.tmp -I/<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/gtest/objs/precompiled -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_GNU_SOURCE -D_REENTRANT -pipe -fno-rtti -fno-exceptions -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer -fcheck-new -fstack-protector -std=gnu++98 -DLIBC=gnu -DSUPPORTS_CLOCK_MONOTONIC -DLINUX -Wpointer-arith -Wsign-compare -Wunused-function -Wunused-value -Woverloaded-virtual -fPIC -fmacro-prefix-map=/<<PKGBUILDDIR>>/= -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-delete-null-pointer-checks -fno-lifetime-dse -Wno-format-zero-length -Wtype-limits -Wuninitialized -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -Wformat -fno-stack-protector -Wno-deprecated-declarations -DPRODUCT -DTARGET_ARCH_zero -DINCLUDE_SUFFIX_OS=_linux -DINCLUDE_SUFFIX_CPU=_zero -DINCLUDE_SUFFIX_COMPILER=_gcc -DTARGET_COMPILER_gcc -DRISCV -DHOTSPOT_LIB_ARCH='"riscv64"' -DZERO -DCC_INTERP -DZERO_LIBARCH='"riscv64"' -DINCLUDE_JVMCI=0 -DINCLUDE_AOT=0 -DINCLUDE_G1GC=0 -DINCLUDE_EPSILONGC=0 -DINCLUDE_ZGC=0 -DINCLUDE_SHENANDOAHGC=0 -DINCLUDE_JFR=0 -I/<<PKGBUILDDIR>>/src/hotspot/share -I/<<PKGBUILDDIR>>/src/hotspot/os/linux -I/<<PKGBUILDDIR>>/src/hotspot/os/posix -I/<<PKGBUILDDIR>>/src/hotspot/cpu/zero -I/<<PKGBUILDDIR>>/src/hotspot/os_cpu/linux_zero -I/<<PKGBUILDDIR>>/build/hotspot/variant-zero/gensrc -I/<<PKGBUILDDIR>>/src/hotspot/share/precompiled -I/<<PKGBUILDDIR>>/src/hotspot/share/include -I/<<PKGBUILDDIR>>/src/hotspot/os/posix/include -I/<<PKGBUILDDIR>>/build/support/modules_include/java.base -I/<<PKGBUILDDIR>>/build/support/modules_include/java.base/linux -I/<<PKGBUILDDIR>>/src/java.base/share/native/libjimage -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -Wformat -fno-stack-protector -Wno-deprecated-declarations -Wdate-time -D_FORTIFY_SOURCE=2 -DDEB_MULTIARCH="\"riscv64-linux-gnu\"" -I/<<PKGBUILDDIR>>/test/fmw/gtest -I/<<PKGBUILDDIR>>/test/fmw/gtest/include -I/<<PKGBUILDDIR>>/test/hotspot/gtest -g -Wno-undef -Wno-stringop-overflow -O3 -c -o /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/gtest/objs/test_align.o /<<PKGBUILDDIR>>/test/hotspot/gtest/utilities/test_align.cpp > >(/usr/bin/tee -a /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/gtest/objs/test_align.o.log) 2> >(/usr/bin/tee -a /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/gtest/objs/test_align.o.log >&2) || ( exitcode=$? && /bin/cp /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/gtest/objs/test_align.o.log /<<PKGBUILDDIR>>/build/make-support/failure-logs/hotspot_variant-zero_libjvm_gtest_objs_test_align.o.log && /bin/cp /<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/gtest/objs/test_align.o.cmdline /<<PKGBUILDDIR>>/build/make-support/failure-logs/hotspot_variant-z...

Read more...

Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

I can confirm that I see these spurious crashes, but interestingly only in the googletest runs for hotspot, with the openjdk-lts, -17 and -21 builds for the January 2024 security updates.

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.