From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 508EF385ED4D; Wed, 31 Aug 2022 04:03:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 508EF385ED4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1661918615; bh=p0N8MH5nPHqqJxaKyBztJmVVh59EdhRDNljCz6MZDM8=; h=From:To:Subject:Date:From; b=p+6/Vr3VkBae8xUi0S9gzLtDL1GbXzoizje692zRMdpT6DQw375cu49vcXAD6Zk0p jET2P6hK+Benl4kemBSvdjNZDqhv+GFCuG/EmkS77jH0k4u9XynPkPUlh6WooxwJRN G2t09SItP0wq6oK7kpZORY5oYeiF/F9xuiTt08ng= From: "kevinb at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug compile/29541] New: gdb.compile/compile-cplus-anonymous.exp shows failures with glibc debuginfo installed Date: Wed, 31 Aug 2022 04:03:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: compile X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kevinb at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29541 Bug ID: 29541 Summary: gdb.compile/compile-cplus-anonymous.exp shows failures with glibc debuginfo installed Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: compile Assignee: unassigned at sourceware dot org Reporter: kevinb at redhat dot com Target Milestone: --- I'm seeing failures in the gdb test gdb.compile/compile-cplus-anonymous.exp when run, with glibc debuginfo installed, on Fedora releases ranging from Fedora 29 thru 37 (and rawhide, currently numbered 38 too). I also see the= se failures on Ubuntu 22.04 LTS once a missing symlink is installed for libcc1= .so. To reproduce this problem on Fedora, do (as root or using sudo): [root@f36-1 gdb]# debuginfo-install -y glibc Then, using a recent (or even old) build of upstream gdb, while in the gdb directory (where the 'gdb' executable is found), do: make check TESTS=3Dgdb.compile/compile-cplus-anonymous.exp I see the following failures / summary: FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code anon_e (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code anon_e (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile print anon_e (timeou= t) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code anon_u.aa (time= out) FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code anon_= u.aa (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile print anon_u.aa (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code a.u.b (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code a.u.b (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile print a.u.b (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code a.s.len (timeou= t) FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code a.s.l= en (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile print a.s.len (timeo= ut) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code a.e (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code a.e (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile print a.e (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code (*a.s.ptr !=3D = 'h') (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code (*a.s= .ptr !=3D 'h') (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile print (*a.s.ptr !=3D= 'h') (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code A::BB (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code A::BB (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile print A::BB (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code ABC (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code ABC (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile print ABC (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code DEF (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code DEF (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile print DEF (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code GHI (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code GHI (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile print GHI (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code JKL (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code JKL (timeout) FAIL: gdb.compile/compile-cplus-anonymous.exp: compile print JKL (timeout) =3D=3D=3D gdb Summary =3D=3D=3D # of expected passes 1 # of unexpected failures 33 # of known failures 12 On Fedora, glibc debuginfo can be removed as follows: [root@f36-1 gdb]# dnf remove -y glibc-debuginfo Running gdb.compile/compile-cplus-anonymous.exp with glibc debuginfo NOT installed shows this summary: =3D=3D=3D gdb Summary =3D=3D=3D # of expected passes 34 # of known failures 12 Testing an upstream build of GDB on Ubuntu 22.04 LTS shows: # of untested testcases 1 I found that libcc1.so was missing. So, I did: root@u2204-1:~# cd /usr/lib/x86_64-linux-gnu/ root@u2204-1:/usr/lib/x86_64-linux-gnu# ln -sn libcc1.so.0 libcc1.so With that symlink in place, I see the following failures / summary on Ubuntu 22.04 LTS: FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code anon_e FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code anon_e FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code anon_u.aa FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code anon_= u.aa FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code a.u.b FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code a.u.b FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code a.s.len FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code a.s.l= en FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code a.e FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code a.e FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code (*a.s.ptr !=3D = 'h') FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code (*a.s= .ptr !=3D 'h') FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code A::BB FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code A::BB FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code ABC FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code ABC FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code DEF FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code DEF FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code GHI FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code GHI FAIL: gdb.compile/compile-cplus-anonymous.exp: compile code JKL FAIL: gdb.compile/compile-cplus-anonymous.exp: result of compile code JKL =3D=3D=3D gdb Summary =3D=3D=3D # of expected passes 12 # of unexpected failures 22 # of known failures 12 Back on Fedora, if I run the initial part of the test by hand, without glibc debuginfo installed AND without debuginfod, I see: [kev@f36-1 gdb]$ ./gdb -q testsuite/outputs/gdb.compile/compile-cplus-anonymous/compile-cplus-anonymo= us Reading symbols from testsuite/outputs/gdb.compile/compile-cplus-anonymous/compile-cplus-anonymo= us... (gdb) set debuginfod enabled off (gdb) set height 0 (gdb) set width 0 (gdb) break -qualified main Breakpoint 1 at 0x401145: file /ironwood1/sourceware-git/f36-master/bld/../../worktree-master/gdb/testsuit= e/gdb.compile/compile-cplus-anonymous.cc, line 71. (gdb) run Starting program: /mesquite2/sourceware-git/f36-master/bld/gdb/testsuite/outputs/gdb.compile/= compile-cplus-anonymous/compile-cplus-anonymous=20 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, main () at /ironwood1/sourceware-git/f36-master/bld/../../worktree-master/gdb/testsuit= e/gdb.compile/compile-cplus-anonymous.cc:71 71 A a; (gdb) compile code -- ; (gdb) break 75 Breakpoint 2 at 0x401165: file /ironwood1/sourceware-git/f36-master/bld/../../worktree-master/gdb/testsuit= e/gdb.compile/compile-cplus-anonymous.cc, line 75. (gdb) continue Continuing. Breakpoint 2, main () at /ironwood1/sourceware-git/f36-master/bld/../../worktree-master/gdb/testsuit= e/gdb.compile/compile-cplus-anonymous.cc:75 75 + static_cast (anon_e) + anon_u.bb + anon_s.len; // break = here (gdb) compile code var =3D anon_e (gdb) I.e. 'compile code var =3D anon_e' works as expected. Enabling debuginfod (but still without glibc debuginfo installed system-wid= e) shows the following behavior: (gdb) set debuginfod enabled on ... [same commands and similar output shown above] (gdb) compile code var =3D anon_e *** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins. Event | Plugins PLUGIN_PRE_GENERICIZE | libcp1plugin PLUGIN_GGC_MARKING | libcp1plugin PLUGIN_PRAGMAS | libcp1plugin gdb command line:1:1: internal compiler error: in plugin_start_enum_type, at libcc1/libcp1plugin.cc:1782 Please submit a full bug report, with preprocessed source. See for instructions. GDB is hung at this point, but Ctrl-C returns the user to the GDB prompt. T= his explains the (many) timeouts that I see on Fedora. I see this same behavior when I disable debuginfod, but have glibc debuginfo installed via the 'debuginfo-install glibc' command shown earlier. In the interest of brevity (!), I won't paste that nearly identical output. (The = part that's different is the use of 'set debuginfod enabled off') On Ubuntu 22.04 LTS, when running the test by hand, without debuginfod, but with the libcc1.so symlink fixed as mentioned earlier, I see: (gdb) set debuginfod enabled off ... [snipped session which is largely the same as that shown for Fedora] (gdb) compile code var =3D anon_e *** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins. Event | Plugins PLUGIN_PRE_GENERICIZE | libcp1plugin PLUGIN_GGC_MARKING | libcp1plugin PLUGIN_PRAGMAS | libcp1plugin gdb command line:1:1: internal compiler error: in plugin_start_enum_type, at libcc1/libcp1plugin.cc:1937 0x7fd261edbd8f __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7fd261edbe3f __libc_start_main_impl ../csu/libc-start.c:392 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. Compilation failed. (gdb)=20 The main difference when running this on Ubuntu is that, after printing out= the messages related to the internal compiler error, GDB does not hang, but ins= tead prints "Compilation failed.", returning to the GDB prompt. This explains t= he difference between the number of failures shown for Ubuntu versus Fedora. = On Fedora, the remaining tests failed due to the timeout. On Ubuntu, some gdb tests succeeded; those which attempt to 'compile' something else fail. --=20 You are receiving this mail because: You are on the CC list for the bug.=