issues debugging program threads on 12.04

Bug #1351018 reported by Brian Murray
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdb (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

The Ubuntu Error Tracker is still experiencing some failures when trying to retrace armhf crashes from Utopic. The retracers for the Error Tracker are running 12.04 (with a backported version of gdb from Trusty) and I've attempted to manually retrace a failing .crash file using apport-retrace. Here is the output from gdb with 'set debug libthread-db 1' in my .gdbinit file.

GNU gdb (Ubuntu 7.7-0ubuntu3.2~12.04.1) 7.7
Copyright (C) 2014 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".
The target architecture is assumed to be arm
Reading symbols from /srv/daisy.staging.ubuntu.com/production/cache/Ubuntu 14.10/cache-DhmXbj/sandbox//usr/lib/arm-linux-gnueabihf/indicator-network/indicator-network-service...Reading symbols from /srv/daisy.staging.ubuntu.com/production/cache/Ubuntu 14.10/cache-DhmXbj/sandbox/usr/lib/debug/.build-id/5a/851287dfe6af740803822fa635ea6fa5fa5f19.debug...done.
done.
warning: core file may not match specified executable file.
[New LWP 2270]
[New LWP 2284]
[New LWP 2285]
Trying host libthread_db library: libthread_db.so.1.
Host libthread_db.so.1 resolved to: /lib/x86_64-linux-gnu/libthread_db.so.1.
td_ta_new failed: versions of libpthread and libthread_db do not match
Trying host libthread_db library: /srv/daisy.staging.ubuntu.com/production/cache/Ubuntu 14.10/cache-DhmXbj/sandbox/usr/lib/debug/lib/arm-linux-gnueabihf/libthread_db.so.1.
open failed: No such file or directory.
Trying host libthread_db library: /srv/daisy.staging.ubuntu.com/production/cache/Ubuntu 14.10/cache-DhmXbj/sandbox/lib/arm-linux-gnueabihf/libthread_db.so.1.
dlopen failed: /srv/daisy.staging.ubuntu.com/production/cache/Ubuntu 14.10/cache-DhmXbj/sandbox/lib/arm-linux-gnueabihf/libthread_db.so.1: wrong ELF class: ELFCLASS32.
thread_db_load_search returning 0
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Trying host libthread_db library: libthread_db.so.1.
Host libthread_db.so.1 resolved to: /lib/x86_64-linux-gnu/libthread_db.so.1.
td_ta_new failed: versions of libpthread and libthread_db do not match
Trying host libthread_db library: /srv/daisy.staging.ubuntu.com/production/cache/Ubuntu 14.10/cache-DhmXbj/sandbox/usr/lib/debug/lib/arm-linux-gnueabihf/libthread_db.so.1.
open failed: No such file or directory.
Trying host libthread_db library: /srv/daisy.staging.ubuntu.com/production/cache/Ubuntu 14.10/cache-DhmXbj/sandbox/lib/arm-linux-gnueabihf/libthread_db.so.1.
dlopen failed: /srv/daisy.staging.ubuntu.com/production/cache/Ubuntu 14.10/cache-DhmXbj/sandbox/lib/arm-linux-gnueabihf/libthread_db.so.1: wrong ELF class: ELFCLASS32.
thread_db_load_search returning 0
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Core was generated by `/usr/lib/arm-linux-gnueabihf/indicator-network/indicator-network-service'.
Program terminated with signal SIGABRT, Aborted.
#0 __libc_do_syscall () at ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:44
44 ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file or directory.

When retracing the same crash file on Trusty with the same version of gdb I receive the following messages:

Trying host libthread_db library: libthread_db.so.1.
Host libthread_db.so.1 resolved to: /lib/x86_64-linux-gnu/libthread_db.so.1.
Found 3 new threads in iteration 0.
Found 0 new threads in iteration 1.
Found 0 new threads in iteration 2.
Found 0 new threads in iteration 3.
Found 0 new threads in iteration 4.
[Thread debugging using libthread_db enabled]

Revision history for this message
Brian Murray (brian-murray) wrote :

The complete command being run to retrace the crash file follows:

PYTHONPATH=$PYTHONPATH:/srv/daisy.staging.ubuntu.com/prod
uction/apport python /srv/daisy.staging.ubuntu.com/production/apport/bin/apport-retrace ~/4d9d6984-1883-11e4-84c3-fa163e22e467.crash -S /srv/da
isy.staging.ubuntu.com/production/daisy/retracer/config --sandbox-dir /srv/daisy.staging.ubuntu.com/production/cache/Ubuntu\ 14.10/cache-DhmXbj
/sandbox -C /srv/daisy.staging.ubuntu.com/production/cache/Ubuntu\ 14.10/cache-DhmXbj/cache -o ~/4d9d6984-1883-11e4-84c3-fa163e22e467.proposed.
crash -g

Revision history for this message
Brian Murray (brian-murray) wrote :

The gdb version that I'm using on 12.04 can be found in the following PPA.

https://launchpad.net/~daisy-pluckers/+archive/ubuntu/daisy-seeds

Revision history for this message
Brian Murray (brian-murray) wrote :

I've also put the relevant crash file, as it may contain private date, on chinstrap at /home/brian/4d9d6984-1883-11e4-84c3-fa163e22e467.crash

Revision history for this message
Steve Langasek (vorlon) wrote :
Download full text (17.4 KiB)

In spite of the warnings about libthread_db, I can't see that this is actually causing any problems. Retracing here gives me:

vorlon@virgil:/tmp$ schroot -c precise
(precise)vorlon@virgil:/tmp$ sudo apt-get install apport-retrace
[...]
(precise)vorlon@virgil:/tmp$ sudo add-apt-repository ppa:daisy-pluckers/daisy-seeds
[...]
(precise)vorlon@virgil:/tmp$ sudo apt-get update
[...]
(precise)vorlon@virgil:/tmp$ sudo apt-get install gdb-multiarch apport-retrace
[...]
(precise)vorlon@virgil:/tmp$ apport-retrace -S ~/devel/canonical/daisy/retracer/config/ 4d9d6984-1883-11e4-84c3-fa163e22e467.crash -s -C /tmp/ddeb-cache
Installing extra package indicator-network to get ExecutablePath
gpgv: Signature made Fri Jul 25 09:05:47 2014 UTC using RSA key ID B879A3E9
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./indicator-network_0.5.1+14.10.20140725-0ubuntu1.dsc
dpkg-source: info: extracting indicator-network in indicator-network-0.5.1+14.10.20140725
dpkg-source: info: unpacking indicator-network_0.5.1+14.10.20140725.orig.tar.gz
dpkg-source: info: applying indicator-network_0.5.1+14.10.20140725-0ubuntu1.diff.gz
--- stack trace ---
#0 __libc_do_syscall () at ../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:44
No locals.
#1 0xb6a3805e in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
        _a1 = 0
        _a3tmp = 6
        _a1tmp = 0
        _a3 = 6
        _nametmp = 268
        _a2tmp = 2270
        _a2 = 2270
        _name = 268
        _sys_result = <optimized out>
        pd = 0xb680e000
        pid = 0
        selftid = 2270
#2 0xb6a38d4e in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {1, 3064945215, 3064945144, 3064575611, 3064342309, 3069180536, 3061899264, 3069180712, 3061899264, 3065241600, 729240, 0, 1, 3199521020, 0, 3069123061, 3069180712, 1, 5, 0, 3199521440, 3064036264, 1, 3064946200, 1, 10212828, 3199521044, 3069005824, 3199521440, 3069141488, 10212360, 3061900488}}, sa_flags = 2, sa_restorer = 0x0}
        sigs = {__val = {32, 0 <repeats 31 times>}}
#3 0xb6b892c4 in __gnu_cxx::__verbose_terminate_handler () at ../../../../src/libstdc++-v3/libsupc++/vterminate.cc:95
        terminating = true
        t = <optimized out>
#4 0xb6b87af4 in __cxxabiv1::__terminate (handler=<optimized out>) at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:47
No locals.
#5 0xb6b87b4a in std::terminate () at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:57
No locals.
#6 0xb6b87da0 in __cxxabiv1::__cxa_rethrow () at ../../../../src/libstdc++-v3/libsupc++/eh_throw.cc:125
        globals = <optimized out>
        header = <optimized out>
#7 0xb6e7feac in __shared_count<platform::nmofono::wifi::AccessPoint, std::allocator<platform::nmofono::wifi::AccessPoint>, org::freedesktop::NetworkManager::Interface::AccessPoint&> (__a=..., this=0xbeb4d0dc) at /usr/include/c++/4.9/bits/shared_ptr_base.h:626
No locals.
#8 __shared_ptr<std::allocator<platform::nmofono::wifi::AccessPoint>, org::freedesktop::Network...

Changed in gdb (Ubuntu):
status: New → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

Note, in particular, that 'thread apply all bt' also returns results in this environment. So whatever thread support gdb gets from libthread_db, it doesn't appear to be required for analysis of foreign-architecture crashes.

Revision history for this message
Brian Murray (brian-murray) wrote :

This is actually an issue with apport-retrace and how it manages its sandbox directory. I'll mark this as a duplicate of the new bug I've reported about apport.

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.