apport-retrace crashed with ValueError in load()

Bug #211899 reported by Matt Walker
4
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Low
Martin Pitt

Bug Description

Binary package hint: apport

I was using apport-retrace in the command prompt, and using option (-g)

ProblemType: Crash
ApportLog:
 apport (pid 1169) Fri Apr 4 09:06:19 2008: called for pid 1168, signal 11
 apport (pid 1169) Fri Apr 4 09:06:19 2008: executable: /usr/lib/gnome-screensaver/gnome-screensaver-gl-helper (command line "/usr/lib/gnome-screensaver/gnome-screensaver-gl-helper")
 modinfo: could not open cdrom: No such device
 modinfo: could not open cdrom: No such device
 apport (pid 1169) Fri Apr 4 09:06:28 2008: wrote report /var/crash/_usr_lib_gnome-screensaver_gnome-screensaver-gl-helper.1000.crash
Architecture: i386
Date: Fri Apr 4 10:57:59 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/apport-retrace
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: nvidia
Package: apport-retrace 0.106
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/apport-retrace -g /home/username/Desktop/CoreDump.gz
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
PythonArgs: ['/usr/bin/apport-retrace', '-g', '/home/username/Desktop/CoreDump.gz']
SourcePackage: apport
Title: apport-retrace crashed with ValueError in load()
Uname: Linux 2.6.24-14-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy lpadmin plugdev video

ERROR:
Traceback (most recent call last):
  File "/usr/bin/apport-retrace", line 419, in <module>
    report.load(open(reportfile))
  File "/usr/lib/python2.5/site-packages/problem_report.py", line 157, in load
    (key, value) = line.split(':', 1)
ValueError: need more than 1 value to unpack

Revision history for this message
Matt Walker (matthaeus123) wrote :
Revision history for this message
Daniel Hahler (blueyed) wrote :

This is caused by specifying an invalid report file:
You've given a coredump, but should provide a .crash file instead. Apport then would extract the coredump out of it and run gdb on it (when using the "-g" option, as you've done).

However, apport should not "crash" in this case, but exit with "Cannot open report file" in this case.
I'll attach a branch, which includes this fix.

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

Thanks, Daniel!

Changed in apport:
assignee: nobody → pitti
status: Triaged → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Merged to trunk, thanks!

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

This bug was fixed in the package apport - 0.108

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

  [ Martin Pitt ]
  * apport-{gtk,qt,cli}: Fix handling of file references added by package
    hooks. (LP: #205163)
  * backends/packaging_rpm.py: Fix dependency resolution of uname(*) in the
    RPM backend. Thanks to Patryk Zawadzki! (LP: #213018)
  * backends/packaging_rpm.py: Fix RPM platform parsing, thanks to Patryk
    Zawadzki! (LP: #213015)
  * po/de.po: Fix typo (missing space).
  * debian/apport.default: Disable Apport for the final Hardy release, since
    it is less useful in stable releases, and drains a lot of CPU and I/O
    power on crashes. Disabling it here instead of in update-notifier/adept is
    more discoverable and more centralized.

  [ Daniel Hahler ]
  * bin/apport-retrace: catch the same exceptions from Report.load() like
    ui.load_report() does (LP: #211899)
  * Fix uncaught exceptions in apport itself (LP: #215929):
    - apport/REThread.py: check if "sys" exists in the except block of
      REThread.run()
    - apport_python_hook.py: check if "sys" exists in the finally block of
      apport_excepthook
  * cli/apport-cli: Fix UnboundLocalError in ui_present_crash, which rendered
    apport-cli useless (for reporting crashes) (LP: #216151)

 -- Martin Pitt <email address hidden> Wed, 16 Apr 2008 12:24:32 +0200

Changed in apport:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers