Control: affects -1 + heaptrack
Control: retitle -1 libunwind8: SIGSEGV in _ULarm_step on RPI 3B+ (heaptrack
autopkgtest test fails at armel)
On Sun, 07 Mar 2021 14:38:24 +0100 Tobias Diedrich <[email protected]>
wrote:> Package: libunwind8
Version: 1.2.1-10~deb10u1
Severity: normal
Dear Maintainer,
While trying to use heaptrack to debug a memory leak in lxpanel I found that
libunwind8 which heaptrack is using seems to segfault on armhf.
In case it helps I've rebuilt libunwind8 manually with --enable-debug to get
extra debug output below.
$ UNW_DEBUG_LEVEL=1 heaptrack --debug /usr/bin/lxpanel --profile ranma-test
heaptrack output will be written to "/home/pi/heaptrack.lxpanel.11000.gz"
starting application in GDB, this might take some time...
Reading symbols from /usr/bin/lxpanel...Reading symbols from
/usr/lib/debug/.build-id/71/5b0db86f91aa93d2e1249a5232bebe16cfbf55.debug...done.
done.
Starting program: /usr/bin/lxpanel --profile ranma-test
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0x7559c1f0 (LWP 11032)]
>_ULarm_init_local: (cursor=0x7eff6f68)
>_ULarm_step: dwarf_step()=-10
Thread 1 "lxpanel" received signal SIGSEGV, Segmentation fault.
_ULarm_step (cursor=cursor@entry=0x7effaeb0) at arm/Gstep.c:244
244 arm/Gstep.c: No such file or directory.
(gdb)
Dear Maintainer,
I found the autopkgtest of heaptrack fails, so I tried to collect some more
information,
and as the backtrace ends in libunwind8 I think this is the same issue as in
this bug.
Following is a lighter reproducer, just needing gdb and heaptrack installed.
This is from a Debian Trixie/testing armel systemd-nspawn chroot
within a Debian Trixie/testing arm64 system.
Kind regards,
Bernhard
$ LANG=C.UTF-8 LD_PRELOAD=/usr/lib/heaptrack/libheaptrack_preload.so /bin/ls
Segmentation fault (core dumped)
$ gdb -q
(gdb) directory /home/benutzer/source/libunwind/orig/libunwind-1.6.2/src
Source directories searched:
/home/benutzer/source/libunwind/orig/libunwind-1.6.2/src:$cdir:$cwd
(gdb) file /bin/ls
Reading symbols from /bin/ls...
(No debugging symbols found in /bin/ls)
(gdb) set environment LANG=C.UTF-8
(gdb) set environment LD_PRELOAD=/usr/lib/heaptrack/libheaptrack_preload.so
(gdb) set startup-with-shell off
(gdb) run
Starting program: /usr/bin/ls
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".
[New Thread 0xf7a9c380 (LWP 16285)]
Thread 1 "ls" received signal SIGSEGV, Segmentation fault.
_ULarm_step (cursor=cursor@entry=0xfffeb038) at arm/Gstep.c:164
164 if (dwarf_get(&c->dwarf, DWARF_LOC(frame, 0), &instr) < 0)
(gdb) bt
#0 _ULarm_step (cursor=cursor@entry=0xfffeb038) at arm/Gstep.c:164
#1 0xf7dd8a84 in slow_backtrace (uc=0xfffe6ff0, size=64, buffer=<optimized
out>) at mi/backtrace.c:45
#2 unw_backtrace (buffer=<optimized out>, size=64) at mi/backtrace.c:72
#3 0xf7fbd89c in Trace::fill (skip=2, this=0xfffef0a8) at
./src/track/trace.h:45
#4 heaptrack_malloc (ptr=ptr@entry=0x428720, size=size@entry=5) at
./src/track/libheaptrack.cpp:878
#5 0xf7fbefb0 in malloc (size=5) at ./src/track/heaptrack_preload.cpp:214
#6 0xf7e318e0 in _nl_normalize_codeset (codeset=0xfffef252 "UTF-8",
name_len=5) at l10nflist.c:321
#7 0xf7e31b24 in _nl_explode_name (name=<optimized out>,
language=language@entry=0xfffef260, modifier=modifier@entry=0xfffef264,
territory=territory@entry=0xfffef268, codeset=codeset@entry=0xfffef26c,
normalized_codeset=normalized_codeset@entry=0xfffef270) at explodename.c:104
#8 0xf7e29758 in _nl_find_locale (locale_path=0xf7f6c03c <_nl_default_locale_path>
"/usr/lib/locale", locale_path_len=16, category=category@entry=12,
name=name@entry=0xfffef2f4) at findlocale.c:196
#9 0xf7e2be78 in __GI_setlocale (category=12, locale=<optimized out>) at
setlocale.c:337
#10 0x004022e8 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)