All the apport crash reports are now "*** Error: Invalid problem report" - TypeError: startswith first arg must be bytes or a tuple of bytes, not str

Bug #1015788 reported by Doug McMahon
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Martin Pitt
Quantal
Fix Released
High
Martin Pitt

Bug Description

TEST CASE:
1. Select any crash file in /var/crash/
2. From a terminal run:
$ apport-cli /var/crash/_usr_share_apport_package-hooks_dkms_packages.py.0.crash
3. Select 'View Report'

ACTUAL RESULT:
show this in cli -
Traceback (most recent call last):
  File "/usr/bin/apport-cli", line 366, in <module>
    if not app.run_argv():
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 569, in run_argv
    self.run_crash(self.options.crash_file, False)
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 231, in run_crash
    response = self.ui_present_report_details(allowed_to_report)
  File "/usr/bin/apport-cli", line 206, in ui_present_report_details
    self.collect_info()
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 912, in collect_info
    known_thread.exc_raise()
  File "/usr/lib/python3/dist-packages/apport/REThread.py", line 65, in exc_raise
    raise self._exception[0](self._exception[1]).with_traceback(self._exception[2])
  File "/usr/lib/python3/dist-packages/apport/REThread.py", line 35, in run
    self._retval = self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python3/dist-packages/apport/crashdb_impl/launchpad.py", line 904, in known
    if not line.startswith('bug:'):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: apport 2.2.3-0ubuntu6
ProcVersionSignature: Ubuntu 3.4.0-5.11-generic 3.4.0
Uname: Linux 3.4.0-5-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.2.3-0ubuntu6
Architecture: amd64
CrashReports:
 640:1000:114:16459596:2012-06-20 16:43:49.167639000 -0400:2012-06-20 16:43:50.167639000 -0400:/var/crash/_usr_bin_inkscape.1000.crash
 640:1000:114:51527:2012-06-20 16:42:49.539343000 -0400:2012-06-20 16:42:51.567348389 -0400:/var/crash/_usr_share_apport_apport-gtk.1000.crash
Date: Wed Jun 20 16:44:39 2012
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120603)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Doug McMahon (mc3man) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apport (Ubuntu):
status: New → Confirmed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I got the same crashed when appport triggered automatically after a dkms crash caused by virtualbox module failing to build.

Screenshot of the dialog in attachment.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Example crash file.

description: updated
Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: Confirmed → Triaged
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks, can reproduce with that .crash file.

Changed in apport (Ubuntu Quantal):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.2.4-0ubuntu1

---------------
apport (2.2.4-0ubuntu1) quantal; urgency=low

  * debian/tests/control: Simplify Depends: line by using "@" and dropping
    packages which are already dependencies of apport's packages.
  * debian/tests/control: Drop undefined "no-build-needed" feature.
  * New upstream bug fix release. Changes since our previous trunk snapshot:
    - apport-cli: Unbreak "keep" option. (LP: #1007826)
    - launchpad.py: Fix str vs. bytes crash for already known bugs.
      (LP: #1015788)
 -- Martin Pitt <email address hidden> Thu, 21 Jun 2012 09:13:56 +0200

Changed in apport (Ubuntu Quantal):
status: In Progress → Fix Released
Revision history for this message
Dave Walker (davewalker) wrote :

I am still seeing this issue, attached is the .crash file.

Thanks.

Changed in apport (Ubuntu Quantal):
status: Fix Released → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

It does work for me with both apport-cli and apport-gtk with both Jean-Baptiste's and your .crash file with 2.2.4. I could reproduce the crash with 2.2.3 with both .crash files. So I cannot replicate this any more. Can you please give me the exact steps that you took to get this apport crash? With python-apport 2.2.4 installed, can you please run

  apport-bug /var/crash/_usr_share_apport_package-hooks_dkms_packages.py.0.crash

and see if it crashes?

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

Discussed in IRC, seems fixed for Dave as well.

Changed in apport (Ubuntu Quantal):
status: Incomplete → Fix Released
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

It can still reproduce this defect with apport 2.2.4-0ubuntu1 and the following steps:

0. Remove all the crash files from /var/crash
1. Install and start accerciser. It will crash with LP:1010535
2. Run apport-cli against accerciser's crash file:
 $ apport-cli /var/crash/_usr_bin_accerciser.1000.crash
3. Select 'View report'

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Martin Pitt (pitti)
Changed in apport (Ubuntu Quantal):
status: Fix Released → Triaged
status: Triaged → In Progress
Revision history for this message
Doug McMahon (mc3man) wrote :

At least here apport-cli -c <whatever.crash> does now work (S), with one exception. A browser window must be already open. Otherwise -
*** Error: Network problem

Cannot connect to crash database, please check your Internet connection.

slice indices must be integers or None or have an __index__ method

apport-gtk continues to crash, could file report on??
The initial browser line is -
"apport-gtk crashed with configparser.InterpolationSyntaxError "

And in xsession-errors -
Traceback (most recent call last):
  File "/usr/share/apport/apport-gtk", line 529, in <module>
    app.run_argv()
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 569, in run_argv
    self.run_crash(self.options.crash_file, False)
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 231, in run_crash
    response = self.ui_present_report_details(allowed_to_report)
  File "/usr/share/apport/apport-gtk", line 221, in ui_present_report_details
    self.desktop_info = self.get_desktop_entry()
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 1152, in get_desktop_entry
    result = dict(cp.items('Desktop Entry'))
  File "/usr/lib/python3.2/configparser.py", line 853, in items
    return [(option, value_getter(option)) for option in d.keys()]
  File "/usr/lib/python3.2/configparser.py", line 853, in <listcomp>
    return [(option, value_getter(option)) for option in d.keys()]
  File "/usr/lib/python3.2/configparser.py", line 850, in <lambda>
    section, option, d[option], d)
  File "/usr/lib/python3.2/configparser.py", line 391, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/usr/lib/python3.2/configparser.py", line 440, in _interpolate_some
    "found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%F'

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

Ah, I found what I did wrong in testing, sorry about that. Fixed properly in trunk now.

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

This bug was fixed in the package apport - 2.2.5-0ubuntu1

---------------
apport (2.2.5-0ubuntu1) quantal; urgency=low

  * New upstream bug fix release:
    - launchpad.py: Fix str vs. bytes crash for already known bugs, take 2.
       (LP: #1015788)
    - apport/ui.py, get_desktop_entry(): Disable interpolation, to correctly
      read desktop files with % signs. (LP: #1014341)
    - apport/ui.py: Fix rare crash if a report is already being updated in the
      background when the UI tries to update a previous version. (LP: #949196)
    - GTK and KDE UI tests: Avoid eternal hangs due to "this is not a distro
      package" error messages.
 -- Martin Pitt <email address hidden> Thu, 21 Jun 2012 16:15:20 +0200

Changed in apport (Ubuntu Quantal):
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.