apport-retrace needs initial data collection

Bug #1315530 reported by Chris J Arges
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Invalid
High
Unassigned

Bug Description

I have only tested this on trusty so far.

Steps to reproduce:

Install apport apport-retrace and setup ddeb apt.sources.
Launch a vm
sudo kill -SIGABRT <qemu pid>
wait for /var/crash/_usr_bin_qemu-system-x86_64*.crash to finish
apport-retrace -g -S system _usr_bin_qemu-system-x86_64.106.crash

What happens:
ERROR: report file does not contain one of the required fields: CoreDump DistroRelease Package ExecutablePath

What I expect to happen:
gdb session to be launched

Additional Information:

$ egrep "(CoreDump|DistroRelease|Package|ExecutablePath)" /var/crash/_usr_bin_qemu-system-x86_64.106.crash
DistroRelease: Ubuntu 14.04
ExecutablePath: /usr/bin/qemu-system-x86_64
CoreDump: base64

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: apport 2.14.1-0ubuntu3
ProcVersionSignature: Ubuntu 3.13.0-18.38-generic 3.13.6
Uname: Linux 3.13.0-18-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CrashReports: 640:106:106:63267160:2014-05-02 15:43:47.066079864 -0500:2014-05-02 15:45:05.950082517 -0500:/var/crash/_usr_bin_qemu-system-x86_64.106.crash
Date: Fri May 2 15:48:59 2014
InstallationDate: Installed on 2014-03-17 (46 days ago)
InstallationMedia: Ubuntu-Server 14.04 LTS "Trusty Tahr" - Alpha amd64 (20140313)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Chris J Arges (arges) wrote :
Revision history for this message
Chris J Arges (arges) wrote :

As a workaround I can add the 'Package: qemu' line in the .crash file.
If I do this the following happens:

$ apport-retrace -g -S system _usr_bin_qemu-system-x86_64.106.crash Installing extra package qemu-system-x86 to get ExecutablePath
GNU gdb (Ubuntu 7.7-0ubuntu3) 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".
Reading symbols from /tmp/apport_sandbox_jPKPtQ//usr/bin/qemu-system-x86_64...(no debugging symbols found)...done.
warning: core file may not match specified executable file.
[New LWP 3478]
[New LWP 3483]
[New LWP 3481]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
warning: File "/tmp/apport_sandbox_jPKPtQ/usr/lib/debug/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
 add-auto-load-safe-path /tmp/apport_sandbox_jPKPtQ/usr/lib/debug/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py
line to your configuration file "/home/arges/.gdbinit".
To completely disable this security protection add
 set auto-load safe-path /
line to your configuration file "/home/arges/.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"
Core was generated by `qemu-system-x86_64 -enable-kvm -name lp1254120 -S -machine pc-i440fx-1.7,accel='.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f00a770607f in __GI_ppoll (fds=0x7f00af91a4c0, nfds=10, timeout=<optimized out>, sigmask=0x0)
    at ../sysdeps/unix/sysv/linux/ppoll.c:56
56 ../sysdeps/unix/sysv/linux/ppoll.c: No such file or directory.
(gdb) bt
#0 0x00007f00a770607f in __GI_ppoll (fds=0x7f00af91a4c0, nfds=10, timeout=<optimized out>, sigmask=0x0)
    at ../sysdeps/unix/sysv/linux/ppoll.c:56
#1 0x00007f00ad5d4ee9 in ?? ()
#2 0x00007f00ad59abd4 in ?? ()
#3 0x00007f00ad443d06 in ?? ()
#4 0x00007f00a7639ec5 in __libc_start_main (main=0x7f00ad442770, argc=58, argv=0x7fff04e8e0a8,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff04e8e098)
    at libc-start.c:287
#5 0x00007f00ad44825c in ?? ()

Now I see most of the symbols resolved execpt a choice few. Is this a bug with how qemu's debug symbols are generated?

Revision history for this message
Chris J Arges (arges) wrote :

Also per Serge's suggestion I launched qemu directly via the command line and achieved the same results.

Revision history for this message
Martin Pitt (pitti) wrote :

Nothing specific to QEMU. After /usr/share/apport/apport creates the initial .crash file you need to run that through the UI data collection by clicking on "Details..." or the first step of "Report" (but then not actually send it to Launchpad). This will add all the necessary fields, package versions, etc.

If you run apport-retrace right afterwards, on the same machine, without changing any packages, you can also use apport-retrace's -R option (see manpage).

Changed in apport (Ubuntu):
status: New → Invalid
summary: - apport-retrace doesn't work with qemu
+ apport-retrace needs initial data collection
Revision history for this message
Chris J Arges (arges) wrote :

@pitti,
So how do we use this properly a server (headless) environment when there isn't a UI dialog that pops up?

Changed in apport (Ubuntu):
status: Invalid → New
Revision history for this message
Martin Pitt (pitti) wrote :

As I told, you can run apport-retrace with -R (but that only works on the same machine, without package changes). If you want to move that report someplace else, run it though apport-cli (or ubuntu-bug, amounts to the same thing), i. e. "ubuntu-bug", and look at the details.

Changed in apport (Ubuntu):
status: New → Invalid
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.