apport-unpack crashed with IOError in <module>()

Bug #185273 reported by miked
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: apport

firefox -g 2>&1 | tee ~/Desktop/gdb-firefox.log
... # some output
(gdb) run
... # run and reproduce crash
(gdb) bt full
... # full backtrace output
(gdb) thread apply all backtrace full
... # all threads full backtrace output
(gdb) quit

Now ~/Desktop/gdb-firefox.log will contain infos we need to initially process your crash bug. So, please attach that file to your bug report.

Copy and paste in a xterm the following command:

TMPDIR=$(mktemp -d)
apport-unpack /var/crash/_usr_lib_firefox_firefox-bin.1000.crash $TMPDIR
gdb -nx /usr/lib/firefox/firefox-bin -core $TMPDIR/CoreDump -ex 'backtrace full' -ex 'thread apply all backtrace full' -ex 'quit' 2>&1 | tee gdb.log
rm -fr $TMPDIR

That command will run gdb against the coredump file included in the crash report that was generated when firefox crashed.

Upload the resulting gdb.log to launchpad.

ProblemType: Crash
Architecture: i386
CrashReports:
 600:0:0:7729:2008-01-22 23:24:33.000000000 -0800:2008-01-22 23:25:02.000000000 -0800:/var/crash/_usr_bin_apport-unpack.0.crash
 600:0:0:31570:2008-01-22 02:10:49.000000000 -0800:2008-01-22 02:10:50.000000000 -0800:/var/crash/_usr_bin_update-manager.0.crash
 600:0:0:10460305:2008-01-22 22:37:51.000000000 -0800:2008-01-22 23:12:24.000000000 -0800:/var/crash/_usr_lib_firefox_firefox-bin.0.crash
 600:0:0:1323102:2008-01-22 16:24:24.000000000 -0800:2008-01-22 16:42:48.000000000 -0800:/var/crash/_usr_lib_gnome-applets_gweather-applet-2.0.crash
Date: Tue Jan 22 23:24:34 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/apport-unpack
InterpreterPath: /usr/bin/python2.5
Package: apport 0.100
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/apport-unpack /var/crash/_usr_lib_firefox_firefox-bin.1000.crash /tmp/tmp.fcqeh13877
ProcCwd: /root
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_CA.UTF-8
PythonArgs: ['/usr/bin/apport-unpack', '/var/crash/_usr_lib_firefox_firefox-bin.1000.crash', '/tmp/tmp.fcqeh13877']
SourcePackage: apport
Title: apport-unpack crashed with IOError in <module>()
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/apport-unpack", line 38, in <module>
     pr.load(open(report))
 IOError: [Errno 2] No such file or directory: '/var/crash/_usr_lib_firefox_firefox-bin.1000.crash'
Uname: Linux HewittRand-desktop 2.6.24-4-generic #1 SMP Mon Jan 14 17:30:39 UTC 2008 i686 GNU/Linux
UserGroups: adm admin audio cdrom dialout dip fax floppy fuse plugdev scanner tape

Tags: apport-crash
Revision history for this message
miked (miked11) wrote :
Revision history for this message
miked (miked11) wrote :
Revision history for this message
miked (miked11) wrote :

root@HewittRand-desktop:~# firefox -g 2>&1 | tee ~/Desktop/gdb-firefox.log
/usr/lib/firefox/run-mozilla.sh -g /usr/lib/firefox/firefox-bin
MOZILLA_FIVE_HOME=/usr/lib/firefox
  LD_LIBRARY_PATH=/usr/lib/firefox:/usr/lib/firefox/plugins:/usr/lib/mre/mre
DISPLAY=:0.0
DYLD_LIBRARY_PATH=/usr/lib/firefox:/usr/lib/mre/mre
     LIBRARY_PATH=/usr/lib/firefox:/usr/lib/firefox/components:/usr/lib/mre/mre
       SHLIB_PATH=/usr/lib/firefox:/usr/lib/mre/mre
          LIBPATH=/usr/lib/firefox:/usr/lib/mre/mre
       ADDON_PATH=/usr/lib/firefox
      MOZ_PROGRAM=/usr/lib/firefox/firefox-bin
      MOZ_TOOLKIT=
        moz_debug=1
     moz_debugger=
/usr/bin/gdb /usr/lib/firefox/firefox-bin -x /tmp/mozargs.c13846
GNU gdb 6.7.1-debian
Copyright (C) 2007 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 "i486-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) run
Starting program: /usr/lib/firefox/firefox-bin
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb72216c0 (LWP 13853)]

Program exited normally.
(gdb) bt full
No stack.
(gdb) thread apply all backtrace full
No registers.
(gdb) quit
root@HewittRand-desktop:~#

Revision history for this message
miked (miked11) wrote :

changed security from private to public

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

So, what exactly is the apport bug here?

BTW, instead of your rather complicated recipe you can install apport-retrace and get a gdb session for a .crash report with

  apport-retrace -g /path/to/crash/file

(see --help for other useful options, like fetching debug symbols, etc.)

Changed in apport:
status: New → Incomplete
Revision history for this message
miked (miked11) wrote :

not sure what the apport bug is here, I have moved to Hardy Heron Alpha 4 via fresh install from Live CD.
after trying a
root@HewittRand-desktop:~# sudo apt-get remove libselinux1 as suggested by someone to fix another constantly crashing program.
https://bugs.launchpad.net/ubuntu/+source/poker-network/+bug/95836/comments/11
nothing really worked on my computer after that, so I had to re-install, so I put the new Alpha 4 on here.
So I guess you can close the bug for now, and I will file if it happens again.
The complicated recipe is from here:
https://wiki.ubuntu.com/MozillaTeam/Bugs?action=show&redirect=DebuggingFirefox
but, thanks, I'll take note and try your suggestion in the future.

Revision history for this message
miked (miked11) wrote :

Title: apport-unpack crashed with IOError in <module>()
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/apport-unpack", line 38, in <module>
     pr.load(open(report))
 IOError: [Errno 2] No such file or directory: '/var/crash/_usr_lib_firefox_firefox-bin.1000.crash'

Revision history for this message
miked (miked11) wrote :

Added Info

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

Ah, so I guess this is simply about throwing an exception rather than just an error message, and thus causing an apport report.

Changed in apport:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in bzr head.

Changed in apport:
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 0.103

---------------
apport (0.103) hardy; urgency=low

  * bin/apport-unpack: Print error messages instead of crashing for problems
    like nonexisting file names passed as arguments. (LP: #185273)
  * backends/packaging-apt-dpkg.py, is_distro_package(): Explicitly check site
    for "ppa", so that we do not automatically file bugs for PPA packages.
    This works around Soyuz bug LP #140412 for the time being.
  * apport/report.py: Add standard_title() test cases for Python crashes with
    a custom message, and a custom message with newlines. The latter
    reproduces LP #190947.
  * apport/report.py, standard_title(): Do not rely on a fixed position of the
    topmost function; use iteration and regular expression matching instead.
    (LP: #190947)
  * apport/ui.py, parse_argv(): Specify that --pid/-P argument must be an
    integer, to avoid exceptions when it's not. (LP: #193494)
  * apport/report.py: Use uname -srm, not -a, to hide the hostname. (part of
    LP #192786); also use os.uname() instead of calling the system program.
  * problem_report.py(): Make write() work for reports with CompressedValues.
    Add test case.
  * apport/ui.py: Add test case test_run_crash_anonymity() which asserts that
    the crash dump does not contain strings which can identify the user, such
    as the user name, login name, host name, and current directory.
  * apport/report.py: Add method anonymize() which replaces user specific
    strings with generic ones.
  * apport/ui.py, thread_collect_info(): Call anonymize() on the report.
    (LP: #192786)
  * bin/apport-retrace: Only update a bug report with new attachments if it is
    not a duplicate. (LP: #172792)
  * bin/apport-retrace: Print out proper error message instead of an exception
    if trying to do write operations to the bug tracker without specifying
    a cookie file. (LP: #146423)

 -- Martin Pitt <email address hidden> Mon, 25 Feb 2008 17:47:13 +0100

Changed in apport:
status: Fix Committed → Fix Released
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.