apport-retrace sandbox produces poor stacktraces

Bug #1867473 reported by Esokrates
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apport
New
Undecided
Unassigned

Bug Description

ENVIRONMENT:

Ubuntu 20.04, fully upgraded as of Mar 14 2020.

ISSUE:

Running apport-retrace -v -s -R -S system ./crash/_usr_bin_texstudio.1000.crash gives me the following stacktrace:

--- stack trace ---
#0 0x00007fa95a8273eb in ?? ()
No symbol table info available.
#1 0x0000000000000000 in ?? ()
No symbol table info available.
--- source code stack trace ---
#0 0x00007fa95a8273eb in ?? ()
#1 0x0000000000000000 in ?? ()

EXPECTED BEHAVIOR:

apport-retrace should actually give a meaningful symbolic backtrace, after all it downloads tons of debug packages to a sandbox directory, but it seems gdb is unable to use them currently.

NOTES:

When just running apport-retrace without sandbox
apport-retrace -v -s -R ./crash/_usr_bin_texstudio.1000.crash
the backtrace is a lot more meaningful:

--- stack trace ---
#0 0x00007fa95a8273eb in __sigqueue (pid=-1846630280, sig=1428118536, val=...) at ../sysdeps/unix/sysv/linux/sigqueue.c:37
        __arg2 = <optimized out>
        _a3 = 0
        _a1 = 2
        resultvar = <optimized out>
        __arg3 = <optimized out>
        __arg1 = <optimized out>
        _a2 = 1428117936
        resultvar = <optimized out>
        info = {si_signo = 0, si_errno = 0, si_code = 0, __pad0 = 0, _sifields = {_pad = {0, 0, 0, 0, 0, 0, 0, 0, 232, 0, -1846620176, 22096, 63, 0, -1, 0, -1, 0, 1524671248, 32681, 228, 0, 1428118368, 32764, 1428118368, 32764, 752987136, 629759851}, _kill = {si_pid = 0, si_uid = 0}, _timer = {si_tid = 0, si_overrun = 0, si_sigval = {sival_int = 0, sival_ptr = 0x0}}, _rt = {si_pid = 0, si_uid = 0, si_sigval = {sival_int = 0, sival_ptr = 0x0}}, _sigchld = {si_pid = 0, si_uid = 0, si_status = 0, si_utime = 0, si_stime = 0}, _sigfault = {si_addr = 0x0, si_addr_lsb = 0, _bounds = {_addr_bnd = {_lower = 0x0, _upper = 0x0}, _pkey = 0}}, _sigpoll = {si_band = 0, si_fd = 0}, _sigsys = {_call_addr = 0x0, _syscall = 0, _arch = 0}}}
#1 0xffffffffffffffff in ?? ()
No symbol table info available.
#2 0xffffffffffffffff in ?? ()
No symbol table info available.
#3 0xffffffffffffffff in ?? ()
No symbol table info available.
#4 0xffffffffffffffff in ?? ()
No symbol table info available.
#5 0xffffffffffffffff in ?? ()
No symbol table info available.
#6 0xffffffffffffffff in ?? ()
No symbol table info available.
#7 0xffffffffffffffff in ?? ()
No symbol table info available.
#8 0xffffffffffffffff in ?? ()
No symbol table info available.
#9 0xffffffffffffffff in ?? ()
No symbol table info available.
#10 0x0000565091eecff0 in ?? ()
No symbol table info available.
#11 0x25895f6b2ce1ac00 in ?? ()
No symbol table info available.
#12 0x0000565091eecdf8 in ?? ()
No symbol table info available.
#13 0x00007fa95a806899 in _IO_acquire_lock_fct (p=<synthetic pointer>) at ../libio/libioP.h:885
        fp = 0xffffffffffffffff
        fp = <optimized out>
        __value = <optimized out>
        __futex = <optimized out>
        __private = <optimized out>
        __oldval = <optimized out>
        result = <optimized out>
        __ret = <optimized out>
        resultvar = <optimized out>
        __arg4 = <optimized out>
        __arg3 = <optimized out>
        __arg2 = <optimized out>
        __arg1 = <optimized out>
        _a4 = <optimized out>
        _a3 = <optimized out>
        _a2 = <optimized out>
        _a1 = <optimized out>
        __lll_private_flag_priv = <optimized out>
#14 __fread_chk (ptr=0x7ffc551f5dc8, ptrlen=<optimized out>, size=18446744073709551615, n=18446744073709551615, stream=0xffffffffffffffff) at fread_chk.c:50
        _IO_acquire_lock_file = 0xffffffffffffffff
        bytes_requested = 18446744073709551615
        bytes_read = <optimized out>
#15 0x0000000000000000 in ?? ()
No symbol table info available.
--- source code stack trace ---
#0 0x00007fa95a8273eb in __sigqueue (pid=-1846630280, sig=1428118536, val=...) at ../sysdeps/unix/sysv/linux/sigqueue.c:37
  [Error: sigqueue.c was not found in source tree]
#1 0xffffffffffffffff in ?? ()
#2 0xffffffffffffffff in ?? ()
#3 0xffffffffffffffff in ?? ()
#4 0xffffffffffffffff in ?? ()
#5 0xffffffffffffffff in ?? ()
#6 0xffffffffffffffff in ?? ()
#7 0xffffffffffffffff in ?? ()
#8 0xffffffffffffffff in ?? ()
#9 0xffffffffffffffff in ?? ()
#10 0x0000565091eecff0 in ?? ()
#11 0x25895f6b2ce1ac00 in ?? ()
#12 0x0000565091eecdf8 in ?? ()
#13 0x00007fa95a806899 in _IO_acquire_lock_fct (p=<synthetic pointer>) at ../libio/libioP.h:885
  [Error: libioP.h was not found in source tree]
#14 __fread_chk (ptr=0x7ffc551f5dc8, ptrlen=<optimized out>, size=18446744073709551615, n=18446744073709551615, stream=0xffffffffffffffff) at fread_chk.c:50
  [Error: fread_chk.c was not found in source tree]
#15 0x0000000000000000 in ?? ()

Tags: focal
Revision history for this message
Esokrates (esokrarkose) wrote :

Full command-line output of apport-retrace in sandbox mode producing the poor stacktrace.

Revision history for this message
Esokrates (esokrarkose) wrote :

Full command-line output of apport-retrace without sandbox.

description: updated
Revision history for this message
Esokrates (esokrarkose) wrote :
Download full text (8.9 KiB)

@Brian I tried to debug this by issuing the -g option to apport retrace, which gives me:

Calling gdb command: /usr/bin/gdb --ex 'set debug-file-directory /tmp/apport_sandbox_rih8yvfy/usr/lib/debug' --ex 'set solib-absolute-prefix /tmp/apport_sandbox_rih8yvfy' --ex 'add-auto-load-safe-path /tmp/apport_sandbox_rih8yvfy' --ex 'set solib-search-path /tmp/apport_sandbox_rih8yvfy/lib/x86_64-linux-gnu:/tmp/apport_sandbox_rih8yvfy/usr/lib/x86_64-linux-gnu' --ex 'file "/tmp/apport_sandbox_rih8yvfy//usr/bin/texstudio"' --ex 'core-file /tmp/apport_core_gmg4gf7g'
GNU gdb (Ubuntu 9.1-0ubuntu1) 9.1
Copyright (C) 2020 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://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 /tmp/apport_sandbox_rih8yvfy//usr/bin/texstudio...
Reading symbols from /tmp/apport_sandbox_rih8yvfy/usr/lib/debug/.build-id/90/1b4c734e207fe3bfc4d5d7ed4d0baab80b42f2.debug...
[New LWP 138768]
warning: Could not load shared library symbols for 11 libraries, e.g. /lib/x86_64-linux-gnu/libz.so.1.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
could not find '.gnu_debugaltlink' file for /tmp/apport_sandbox_rih8yvfy/usr/lib/debug/.build-id/60/afa9bc5fc9c30d79801655716b91d871f75d33.debug
Core was generated by `texstudio'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007fa95a8273eb in ?? ()
(gdb)

Please note the warnings printed here, there is even a bug report from you associated with one of the warnings: https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1818918

(gdb) info sharedlibrary
From To Syms Read Shared Object Library
0x00007fa95c59e0c0 0x00007fa95c6274f6 Yes /tmp/apport_sandbox_rih8yvfy/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
0x00007fa95c55f460 0x00007fa95c5799c9 Yes /tmp/apport_sandbox_rih8yvfy/usr/lib/x86_64-linux-gnu/libquazip5.so.1.0.0
                                        No /lib/x86_64-linux-gnu/libz.so.1
0x00007fa95c4ca4d0 0x00007fa95c508483 Yes /tmp/apport_sandbox_rih8yvfy/usr/lib/x86_64-linux-gnu/libhunspell-1.7.so.0.0.1
0x00007fa95c46d6d0 0x00007fa95c4a98e7 Yes /tmp/apport_sandbox_rih8yvfy/usr/lib/x86_64-linux-gnu/libpoppler-qt5.so.1.22.0
0x00007fa95c3efe00 0x00007fa95c423a28 Yes /tmp/apport_sandbox_rih8yvfy/usr/lib/x86_64-linux-gnu/libQt5PrintSupport.so.5.12.5
0x00007fa95be89700 0x00007fa95c23b029 Yes /tmp/apport_sandbox_rih8yvfy/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.12.5
0x00007fa95b81f030 0x00007fa95bc31576 Yes /tmp/apport_sandbox_rih8y...

Read more...

Revision history for this message
Esokrates (esokrarkose) wrote :
Download full text (44.1 KiB)

I reproduced with fully upgraded packages in focal as of today:

apport-retrace -v -g -S system ./_usr_bin_texstudio.1000.crash
Get:1 https://mirror.init7.net/ubuntu focal InRelease [265 kB]
Get:2 http://ppa.launchpad.net/saiarcot895/chromium-dev/ubuntu focal InRelease [23.8 kB]
Get:3 https://mirror.init7.net/ubuntu focal-updates InRelease [89.1 kB]
Get:4 https://mirror.init7.net/ubuntu focal-backports InRelease [89.2 kB]
Get:5 https://mirror.init7.net/ubuntu focal-security InRelease [97.9 kB]
Get:6 http://ppa.launchpad.net/saiarcot895/chromium-dev/ubuntu focal/main amd64 Packages [1740 B]
Get:7 https://mirror.init7.net/ubuntu focal/universe Sources [9723 kB]
Get:8 https://mirror.init7.net/ubuntu focal/main Sources [842 kB]
Get:9 https://mirror.init7.net/ubuntu focal/restricted Sources [6816 B]
Get:10 https://mirror.init7.net/ubuntu focal/multiverse Sources [174 kB]
Get:11 https://mirror.init7.net/ubuntu focal/main amd64 Packages [979 kB]
Get:12 https://mirror.init7.net/ubuntu focal/main amd64 DEP-11 Metadata [496 kB]
Get:13 https://mirror.init7.net/ubuntu focal/main DEP-11 48x48 Icons [99.9 kB]
Get:14 https://mirror.init7.net/ubuntu focal/main DEP-11 64x64 Icons [165 kB]
Get:15 https://mirror.init7.net/ubuntu focal amd64 Contents (deb) [41.2 MB]
Get:16 https://mirror.init7.net/ubuntu focal/restricted amd64 Packages [22.8 kB]
Get:17 https://mirror.init7.net/ubuntu focal/universe amd64 Packages [8602 kB]
Get:18 https://mirror.init7.net/ubuntu focal/universe amd64 DEP-11 Metadata [3589 kB]
Get:19 https://mirror.init7.net/ubuntu focal/universe DEP-11 48x48 Icons [3015 kB]
Get:20 https://mirror.init7.net/ubuntu focal/universe DEP-11 64x64 Icons [7795 kB]
Get:21 https://mirror.init7.net/ubuntu focal/multiverse amd64 Packages [144 kB]
Get:22 https://mirror.init7.net/ubuntu focal/multiverse amd64 DEP-11 Metadata [48.0 kB]
Get:23 https://mirror.init7.net/ubuntu focal/multiverse DEP-11 48x48 Icons [23.1 kB]
Get:24 https://mirror.init7.net/ubuntu focal/multiverse DEP-11 64x64 Icons [188 kB]
Get:25 https://mirror.init7.net/ubuntu focal-security/main amd64 DEP-11 Metadata [204 B]
Get:26 https://mirror.init7.net/ubuntu focal-security/main DEP-11 48x48 Icons [29 B]
Get:27 https://mirror.init7.net/ubuntu focal-security/main DEP-11 64x64 Icons [29 B]
Get:28 https://mirror.init7.net/ubuntu focal-security/universe amd64 DEP-11 Metadata [208 B]
Get:29 https://mirror.init7.net/ubuntu focal-security/universe DEP-11 48x48 Icons [29 B]
Get:30 https://mirror.init7.net/ubuntu focal-security/universe DEP-11 64x64 Icons [29 B]
Fetched 77.7 MB in 6s (2337 kB/s)
Fetched 0 B in 0s (0 B/s)
Extracting downloaded debs...
dynamically loaded /usr/lib/x86_64-linux-gnu/libdatrie.so.1.3.5 needs package libdatrie1, queueing
dynamically loaded /usr/lib/x86_64-linux-gnu/libxshmfence.so.1.0.0 needs package libxshmfence1, queueing
WARNING: /usr/lib/x86_64-linux-gnu/librt-2.31.so is needed, but cannot be mapped to a package
dynamically loaded /usr/lib/x86_64-linux-gnu/libwayland-cursor.so.0.0.0 nee...

Revision history for this message
Esokrates (esokrarkose) wrote :

@Brian: Unfortunately apport still generates very poor stacktraces, most of the time when reporting a bug upstream with an retraced apport file the devs complain about the incomplete stacktrace, see e.g. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2643

@vanvugt remarked in a comment that all the crash files ubuntu received did not lead to a proper backtrace. I'm seeing the same issue with other crashes too, apport is not capable of creating a proper backtrace.

I attached my version of the crash file of the upstream bug to reproduce the issue.

Revision history for this message
Esokrates (esokrarkose) wrote :
Download full text (24.6 KiB)

Output of the attached file when running apport-retrace:

apport-retrace -S system -v -s _usr_libexec_gnome-shell-hotplug-sniffer.1000.crash
Get:1 http://dl.google.com/linux/chrome/deb stable InRelease [1811 B]
Get:2 https://mirror.init7.net/ubuntu focal InRelease [265 kB]
Get:3 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1127 B]
Ign http://ddebs.ubuntu.com focal-updates InRelease
Ign http://ddebs.ubuntu.com focal-proposed InRelease
Ign http://ddebs.ubuntu.com focal InRelease
Get:4 http://ddebs.ubuntu.com focal-updates Release [40.5 kB]
Get:5 https://mirror.init7.net/ubuntu focal-updates InRelease [107 kB]
Get:6 http://ddebs.ubuntu.com focal-proposed Release [40.5 kB]
Get:7 https://mirror.init7.net/ubuntu focal-backports InRelease [98.3 kB]
Get:8 http://ddebs.ubuntu.com focal Release [40.4 kB]
Get:9 https://mirror.init7.net/ubuntu focal-security InRelease [107 kB]
Get:10 http://ddebs.ubuntu.com focal-updates Release.gpg [819 B]
Get:11 http://ddebs.ubuntu.com focal-proposed Release.gpg [819 B]
Get:12 https://mirror.init7.net/ubuntu focal/multiverse Sources [174 kB]
Get:13 http://ddebs.ubuntu.com focal Release.gpg [819 B]
Get:14 http://ddebs.ubuntu.com focal-updates/main amd64 Packages [102 kB]
Get:15 https://mirror.init7.net/ubuntu focal/restricted Sources [6472 B] ...

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.