Description of problem: In java-latest-openjdk we have a gdb backtrace check so as to ensure debug information is there for the OpenJDK build. It started failing in rawhide with the gcc 12 update in rawhide on 2022-01-14 and needs to be investigated. Version-Release number of selected component (if applicable): 1:17.0.1.0.12-15.rolling How reproducible: 100% Steps to Reproduce: 1. fedpkg clone java-latest-openjdk && cd java-latest-openjdk && fedpkg build Actual results: gdb check fails with: + gdb -q /builddir/build/BUILD/java-17-openjdk-17.0.1.0.12-15.rolling.fc36.x86_64/build/jdk17.build-slowdebug-main/images/jdk/bin/java + tee gdb.out Reading symbols from /builddir/build/BUILD/java-17-openjdk-17.0.1.0.12-15.rolling.fc36.x86_64/build/jdk17.build-slowdebug-main/images/jdk/bin/java... (gdb) Signal Stop Print Pass to program Description SIGSEGV No No Yes Segmentation fault (gdb) Signal Stop Print Pass to program Description SIGILL No No Yes Illegal instruction (gdb) (gdb) No source file named javaCalls.cpp. Breakpoint 1 (javaCalls.cpp:1) pending. (gdb) >>>(gdb) Starting program: /builddir/build/BUILD/java-17-openjdk-17.0.1.0.12-15.rolling.fc36.x86_64/build/jdk17.build-slowdebug-main/images/jdk/bin/java -version This GDB supports auto-downloading debuginfo from the following URLs: https://debuginfod.fedoraproject.org/ Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal] Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". ../../gdb/objfiles.h:510: internal-error: sect_index_data not initialized A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) [answered Y; input not from terminal] This is a bug, please report it. For instructions, see: <https://www.gnu.org/software/gdb/bugs/>. + grep JavaCallWrapper::JavaCallWrapper gdb.out error: Bad exit status from /var/tmp/rpm-tmp.IJo5Om (%check) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.IJo5Om (%check) Child return code was: 1 EXCEPTION: [Error()] Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.10/site-packages/mockbuild/util.py", line 600, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: Expected results: gdb check passes Additional info: Link to failed task https://koji.fedoraproject.org/koji/taskinfo?taskID=81387738 Koschei link: https://koschei.fedoraproject.org/package/java-latest-openjdk?collection=f36
This affects x86, x86_64, ppc64le and (now confirmed by re-enabling it) s390x. s390x may still be broken even if this particular bug is fixed; it has been disabled for a long time. s390x logs: https://koji.fedoraproject.org/koji/taskinfo?taskID=81412068
s390x hits it both on 11u & 17u (JIT) and 8u (Zero), FWIW.
This is actually bug 2042664 and can be reproduced by using gdb from rawhide to debug this simple program (install java-1.8.0-openjdk-devel first): $ cat dlopen_test.c #include <stdio.h> #include <dlfcn.h> int main() { void *libjvm; libjvm = dlopen("libjvm.so", RTLD_NOW + RTLD_GLOBAL); printf("libjvm == %ld\n", (unsigned long)libjvm); return 0; } $ export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0-openjdk/jre/lib/amd64/server $ gdb ./a.out GNU gdb (GDB) Fedora 11.1-9.fc36 Copyright (C) 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./a.out... (gdb) break dlopen Breakpoint 1 at 0x401040 (gdb) run Starting program: /a.out This GDB supports auto-downloading debuginfo from the following URLs: https://debuginfod.fedoraproject.org/ Enable debuginfod for this session? (y or [n]) n Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, 0x00007ffff7e46a90 in dlopen.5 () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff7e46a90 in dlopen.5 () from /lib64/libc.so.6 #1 0x000000000040114d in main () at dlopen_test.c:6 (gdb) next Single stepping until exit from function dlopen.5, which has no line number information. Missing separate debuginfos, use: dnf debuginfo-install glibc-2.34.9000-36.fc36.x86_64 java-1.8.0-openjdk-headless-1.8.0.322.b04-0.1.ea.fc36.x86_64 libgcc-12.0.1-0.2.fc36.x86_64 libstdc++-12.0.1-0.2.fc36.x86_64 ../../gdb/objfiles.h:510: internal-error: sect_index_data not initialized A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) n [...] $ rpm -q gdb gdb-11.1-9.fc36.x86_64
FEDORA-2022-8a2e133345 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8a2e133345
FEDORA-2022-8a2e133345 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
Re-opening as the update in question merely disabled the gdb check. We should re-enable now that the dependent bug is fixed.
https://src.fedoraproject.org/rpms/java-1.8.0-openjdk/c/2988ce90ffc176c047dcb63bb70e4c8ca1ec6d88?branch=rawhide was the commit (as the update referenced a java-1.8.0-openjdk build).
(In reply to Severin Gehwolf from comment #6) > Re-opening as the update in question merely disabled the gdb check. We > should re-enable now that the dependent bug is fixed. Yes, sadly the Fedora system seems unable to tell the difference between 'Resolved' and 'Related'. Thanks for reopening.
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
FEDORA-2022-b63ee3f2ac has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b63ee3f2ac
FEDORA-2022-b63ee3f2ac has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-b35a3762ab has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b35a3762ab
FEDORA-2022-b35a3762ab has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.