[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1020857: libc6: 2.35-1 breaks gdb on hppa



Package: libc6
Version: 2.34-8
Severity: normal

Dear Maintainer,

dave@atlas:~$ gdb
Segmentation fault (core dumped)

Gdb doesn't drop core if I revert glibc to 2.34-8.

Sep 26 22:04:36 mx3210 kernel: do_page_fault() command='gdb' type=6 address=0x4bc63f0b in libresolv.so.2[ea7f2000+e000]
Sep 26 22:04:36 mx3210 kernel: trap #6: Instruction TLB miss fault, vm_start = 0x0098b000, vm_end = 0x009c4000
Sep 26 22:04:36 mx3210 kernel: command line: gdb
Sep 26 22:04:36 mx3210 kernel: CPU: 0 PID: 7976 Comm: gdb Not tainted 5.19.11+ #1
Sep 26 22:04:36 mx3210 kernel: Hardware name: 9000/800/rp3440
Sep 26 22:04:36 mx3210 kernel:
Sep 26 22:04:36 mx3210 kernel:     YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
Sep 26 22:04:36 mx3210 kernel: PSW: 00000000000001101111111100001111 Not tainted
Sep 26 22:04:36 mx3210 kernel: r00-03  000000ff0006ff0f 000000000014a908 00000000006b5537 0000000000000154
Sep 26 22:04:36 mx3210 kernel: r04-07  00000000f2e59fd4 00000000f4e396c8 00000000009562d0 00000000f4e1176c
Sep 26 22:04:36 mx3210 kernel: r08-11  00000000f4e117dc 0000000000000000 0000000000000000 00000000ffffffff
Sep 26 22:04:36 mx3210 kernel: r12-15  0000000000000000 0000000000177730 0000000000000000 0000000000000000
Sep 26 22:04:36 mx3210 kernel: r16-19  0000000000000001 000000000013c41c 000000000016e870 000000004bc53f11
Sep 26 22:04:36 mx3210 kernel: r20-23  00000000009562d0 000000004bc63f09 000000000014add8 0000000000000000
Sep 26 22:04:36 mx3210 kernel: r24-27  00000000f4e117dc 00000000f4e1176c 0000000000000154 0000000000135108
Sep 26 22:04:36 mx3210 kernel: r28-31  0000000000000000 0000000000000001 00000000f98e24c0 0000000000011234
Sep 26 22:04:36 mx3210 kernel: sr00-03  0000000000957400 0000000000000000 0000000000000000 0000000000957400
Sep 26 22:04:36 mx3210 kernel: sr04-07  0000000000957400 0000000000957400 0000000000957400 0000000000957400
Sep 26 22:04:36 mx3210 kernel:
Sep 26 22:04:36 mx3210 kernel:      VZOUICununcqcqcqcqcqcrmunTDVZOUI
Sep 26 22:04:36 mx3210 kernel: FPSR: 00000000000000000000000000000000
Sep 26 22:04:36 mx3210 kernel: FPER1: 00000000
Sep 26 22:04:36 mx3210 kernel: fr00-03  0000000000000000 0000000000000000 0000000000000000 0000000000000000
Sep 26 22:04:36 mx3210 kernel: fr04-07  0000000000000000 0000000000000000 0000000000000000 0000000000000000
Sep 26 22:04:36 mx3210 kernel: fr08-11  0000000000000000 0000000000000000 0000000000000000 0000000000000000
Sep 26 22:04:36 mx3210 kernel: fr12-15  0000000000000000 0000000000000000 0000000000000000 0000000000000000
Sep 26 22:04:36 mx3210 kernel: fr16-19  0000000000000000 0000000000000000 0000000000000000 0000000000000000
Sep 26 22:04:36 mx3210 kernel: fr20-23  0000000000000000 0000000000000000 006b5500009562d0 0000000000000000
Sep 26 22:04:36 mx3210 kernel: fr24-27  0000000000000000 0000000000000000 0000000000000000 0000000000000000
Sep 26 22:04:36 mx3210 kernel: fr28-31  0000000000000000 0000000000000000 0000000000000000 0000000000000000
Sep 26 22:04:36 mx3210 kernel:
Sep 26 22:04:36 mx3210 kernel: IASQ: 0000000000957400 0000000000957400 IAOQ: 000000004bc63f0b 000000004bc63f0f
Sep 26 22:04:36 mx3210 kernel: IIR: 43ffff80    ISR: 0000000000957400  IOR: 000000000014add8
Sep 26 22:04:36 mx3210 kernel: CPU:        0   CR30: 00000040d6db4570 CR31: ffffffffffffefff
Sep 26 22:04:36 mx3210 kernel: ORIG_R28: 0000000000000000
Sep 26 22:04:36 mx3210 kernel: IAOQ[0]: 000000004bc63f0b
Sep 26 22:04:36 mx3210 kernel: IAOQ[1]: 000000004bc63f0f
Sep 26 22:04:36 mx3210 kernel: RP(r2): 00000000006b5537

   104c4:       43 ff ff 80     ldb 1fc0(sr3,r31),r31

dave@mx3210:~$ gdb -c core_gdb /usr/bin/gdb
GNU gdb (Debian 12.1-3) 12.1
Copyright (C) 2022 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 "hppa-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 /usr/bin/gdb...
(No debugging symbols found in /usr/bin/gdb)
[New LWP 8366]

warning: File "/usr/lib/hppa-linux-gnu/libthread_db.so.1" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load:/lib/hppa-linux-gnu/libthread_db-1.0.so:/home/dave/debian/firefox/firefox-50.1.0/.gdbinit".
To enable execution of this file add
        add-auto-load-safe-path /usr/lib/hppa-linux-gnu/libthread_db.so.1
line to your configuration file "/home/dave/.gdbinit".
To completely disable this security protection add
        set auto-load safe-path /
--Type <RET> for more, q to quit, c to continue without paging--
line to your configuration file "/home/dave/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
        info "(gdb)Auto-loading safe path"

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Core was generated by `gdb'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x4bc63f08 in ?? ()
(gdb) bt
#0  0x4bc63f08 in ?? ()
#1  0x006b5534 in operator new(unsigned int) ()
#2  0xf2dcbc00 in boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int) ()
   from /lib/hppa-linux-gnu/libboost_regex.so.1.74.0
#3  0xf4d7a434 in ?? () from /lib/hppa-linux-gnu/libsource-highlight.so.4
#4  0xf78bfe50 in ?? () from /lib/ld.so.1
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) info shared
>From        To          Syms Read   Shared Object Library
0xf759e330  0xf75d6620  Yes (*)     /lib/hppa-linux-gnu/libreadline.so.8
0xf7510160  0xf75233e8  Yes (*)     /lib/hppa-linux-gnu/libz.so.1
0xf714f6a0  0xf717b7cc  Yes (*)     /lib/hppa-linux-gnu/libncursesw.so.6
0xf7117480  0xf712a86c  Yes (*)     /lib/hppa-linux-gnu/libtinfo.so.6
0xf70b9560  0xf70b99bc  Yes         /lib/hppa-linux-gnu/libdl.so.2
0xf69b56d0  0xf6c998bc  Yes         /lib/hppa-linux-gnu/libpython3.10.so.1.0
0xf68b98f0  0xf68b9d4c  Yes         /lib/hppa-linux-gnu/libpthread.so.0
0xf64c8ef8  0xf64fc374  Yes         /lib/hppa-linux-gnu/libm.so.6
0xf6113f80  0xf6135674  Yes (*)     /lib/hppa-linux-gnu/libexpat.so.1
0xf60bc544  0xf60d9e3c  Yes (*)     /lib/hppa-linux-gnu/liblzma.so.5
0xf5d4a5a0  0xf5d53e2c  Yes (*)     /lib/hppa-linux-gnu/libbabeltrace.so.1
0xf59f1870  0xf5a2f60c  Yes (*)     /lib/hppa-linux-gnu/libbabeltrace-ctf.so.1
0xf5596cf0  0xf55f98dc  Yes (*)     /lib/hppa-linux-gnu/libmpfr.so.6
0xf5195d90  0xf51f78ec  Yes (*)     /lib/hppa-linux-gnu/libgmp.so.10
0xf4d7624c  0xf4e0ed98  Yes (*)     /lib/hppa-linux-gnu/libsource-highlight.so.4
0xf4b7b630  0xf4b92c3c  Yes (*)     /lib/hppa-linux-gnu/libxxhash.so.0
0xf4825a6c  0xf482945c  Yes (*)     /lib/hppa-linux-gnu/libdebuginfod.so.1
0xf447faf0  0xf45cc900  Yes (*)     /lib/hppa-linux-gnu/libstdc++.so.6
0xf3ff3fb0  0xf4003b70  Yes (*)     /lib/hppa-linux-gnu/libgcc_s.so.4
0xf3ce33f0  0xf3e3890c  Yes         /lib/hppa-linux-gnu/libc.so.6
0xf78bfe70  0xf78e51fc  Yes         /lib/ld.so.1
0xf3933ee0  0xf39eac40  Yes         /lib/hppa-linux-gnu/libglib-2.0.so.0
0xf3838f70  0xf38b124c  Yes (*)     /lib/hppa-linux-gnu/libdw.so.1
0xf3426f80  0xf343fe60  Yes (*)     /lib/hppa-linux-gnu/libelf.so.1
0xf310d2a0  0xf31135a0  Yes (*)     /lib/hppa-linux-gnu/libuuid.so.1
0xf2d5e610  0xf2e36960  Yes (*)     /lib/hppa-linux-gnu/libboost_regex.so.1.74.0
0xf2a8f010  0xf2b10a40  Yes (*)     /lib/hppa-linux-gnu/libcurl-gnutls.so.4
0xf28bada0  0xf28f65ac  Yes (*)     /lib/hppa-linux-gnu/libpcre2-8.so.0
0xf2510210  0xf251e1d0  Yes (*)     /lib/hppa-linux-gnu/libbz2.so.1.0
0xf1e7ddf0  0xf2082984  Yes (*)     /lib/hppa-linux-gnu/libicui18n.so.71
0xf1851540  0xf1970414  Yes (*)     /lib/hppa-linux-gnu/libicuuc.so.71
0xf1551060  0xf156d1f4  Yes (*)     /lib/hppa-linux-gnu/libnghttp2.so.14
0xf118f9f0  0xf1198490  Yes (*)     /lib/hppa-linux-gnu/libidn2.so.0
0xf0e820b0  0xf0e94cac  Yes (*)     /lib/hppa-linux-gnu/librtmp.so.1
0xf0a843e0  0xf0ab5efc  Yes (*)     /lib/hppa-linux-gnu/libssh2.so.1
0xf067ded8  0xf068030c  Yes (*)     /lib/hppa-linux-gnu/libpsl.so.5
0xf0599420  0xf05cbc60  Yes (*)     /lib/hppa-linux-gnu/libnettle.so.8
0xf01c5c40  0xf0305264  Yes (*)     /lib/hppa-linux-gnu/libgnutls.so.30
0xefffd138  0xf0038cf8  Yes (*)     /lib/hppa-linux-gnu/libgssapi_krb5.so.2
0xefd9ea50  0xefde25d0  Yes (*)     /lib/hppa-linux-gnu/libldap-2.5.so.0
0xef990f70  0xef999274  Yes (*)     /lib/hppa-linux-gnu/liblber-2.5.so.0
0xef4beef0  0xef589948  Yes (*)     /lib/hppa-linux-gnu/libzstd.so.1
0xef237b2c  0xef23fe14  Yes (*)     /lib/hppa-linux-gnu/libbrotlidec.so.1
0xed3f23b8  0xed3f2810  Yes (*)     /lib/hppa-linux-gnu/libicudata.so.71
0xed19cac4  0xed1d3dd0  Yes (*)     /lib/hppa-linux-gnu/libunistring.so.2
0xecd94920  0xecdacdf0  Yes (*)     /lib/hppa-linux-gnu/libhogweed.so.6
0xec9613e0  0xecc23198  Yes (*)     /lib/hppa-linux-gnu/libcrypto.so.3
0xec5c46e0  0xec6afa34  Yes (*)     /lib/hppa-linux-gnu/libp11-kit.so.0
0xec1903a0  0xec19e6cc  Yes (*)     /lib/hppa-linux-gnu/libtasn1.so.6
0xec00dfb0  0xec07e0dc  Yes (*)     /lib/hppa-linux-gnu/libkrb5.so.3
0xebbf5330  0xebc1436c  Yes (*)     /lib/hppa-linux-gnu/libk5crypto.so.3
0xeb7f2f28  0xeb7f4268  Yes (*)     /lib/hppa-linux-gnu/libcom_err.so.2
0xeb3f4de0  0xeb3fda4c  Yes (*)     /lib/hppa-linux-gnu/libkrb5support.so.0
0xeaff59d8  0xeb009bc0  Yes (*)     /lib/hppa-linux-gnu/libsasl2.so.2
0xeae7c60c  0xeae7cf6c  Yes (*)     /lib/hppa-linux-gnu/libbrotlicommon.so.1
0xead10420  0xead169e0  Yes         /lib/hppa-linux-gnu/libffi.so.8
0xeabf34cc  0xeabf50a0  Yes (*)     /lib/hppa-linux-gnu/libkeyutils.so.1
0xea7f47d0  0xea7fdf9c  Yes         /lib/hppa-linux-gnu/libresolv.so.2
(*): Shared library is missing debugging information.
(gdb) disass 0x6b5534-16,0x6b5534+16
Dump of assembler code from 0x6b5524 to 0x6b5544:
   0x006b5524 <_Znwj+36>:       stw r5,-70(sp)
   0x006b5528 <_Znwj+40>:       stw r4,-6c(sp)
   0x006b552c <_Znwj+44>:       b,l 0x6bbc00,rp
   0x006b5530 <_Znwj+48>:       copy r3,r26
   0x006b5534 <_Znwj+52>:       movb,= ret0,r5,0x6b5558 <_Znwj+88>
   0x006b5538 <_Znwj+56>:       copy r6,r19
   0x006b553c <_Znwj+60>:       ldw -94(sp),rp
   0x006b5540 <_Znwj+64>:       ldw -74(sp),r6
End of assembler dump.
(gdb) disass 0x6bbc00-16,0x6bbc00+20
Dump of assembler code from 0x6bbbf0 to 0x6bbc14:
   0x006bbbf0:  ldo 5c8(r1),r22
   0x006bbbf4:  ldw 0(r22),r21
   0x006bbbf8:  bv r0(r21)
   0x006bbbfc:  ldw 4(r22),r19
   0x006bbc00:  addil L%15800,dp,r1
   0x006bbc04:  ldo 4d0(r1),r22
   0x006bbc08:  ldw 0(r22),r21
   0x006bbc0c:  bv r0(r21)
   0x006bbc10:  ldw 4(r22),r19
End of assembler dump.
(gdb)  x/2x 0x14add8
0x14add8:       0x4bc63f09      0x4bc53f11

The backtrace is not complete because the above debugging was done with
glibc 2.34-8 and the crash occurs with 2.35-1.

>From what I can tell, the PLT is corrupt. The target and PIC registers
loaded in the long branch stub between 0x006bbc00 and 0x006bbc10 appear
to incorrect. As a result, the code branches to an unmapped location.

So far, this problem seems specific to GNU gdb (Debian 12.1-3) 12.1.
dave@mx3210:~/gnu/gdb/objdir/gdb$ ls -l /usr/bin/gdb
-rwxr-xr-x 1 root root 9940508 Jul  7 17:12 /usr/bin/gdb

An old private build of gdb still seems to work.

I have not seen this issue with any other applications.

Regards,
Dave Anglin

-- System Information:
Debian Release: bookworm/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable')
Architecture: hppa (parisc64)

Kernel: Linux 5.19.11+ (SMP w/4 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libc6 depends on:
ii  libgcc-s4  12.2.0-3

Versions of packages libc6 recommends:
ii  libidn2-0  2.3.3-1+b1

Versions of packages libc6 suggests:
ii  debconf [debconf-2.0]  1.5.79
ii  glibc-doc              2.34-8
ii  libc-l10n              2.34-8
ii  libnss-nis             3.1-4
ii  libnss-nisplus         1.3-4
ii  locales                2.34-8

-- debconf information:
* glibc/restart-services: spamassassin ssh samba postfix openbsd-inetd cron atd
  glibc/restart-failed:
  glibc/kernel-too-old:
* glibc/upgrade: true
  glibc/disable-screensaver:
  glibc/kernel-not-supported:
* libraries/restart-without-asking: true


Reply to: