apport-collect crashs with non int input

Bug #351050 reported by Arnaud Jeansen
40
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Low
Martin Pitt

Bug Description

Binary package hint: apport

Apport-collect crashed on me when I tried to report a bug on hal.

I thought I had to use "apport-collect hal", whereas "ubuntu-bug hal" was what I needed.

Anyway, as apport-collect simply tries to get an int out of the input parameter, "apport-collect foo" seems to crash it reliably.

This is on jaunty beta.

Thanks

ProblemType: Crash
ApportLog:
 apport (pid 10654) Sun Mar 29 16:23:26 2009: called for pid 5852, signal 11
 apport (pid 10654) Sun Mar 29 16:23:26 2009: executable: /usr/sbin/NetworkManager (command line "/usr/sbin/NetworkManager")
 apport (pid 10654) Sun Mar 29 16:23:30 2009: wrote report /var/crash/_usr_sbin_NetworkManager.0.crash
Architecture: i386
CrashReports: 600:1000:1000:8556:2009-03-29 18:20:12.000000000 +0200:2009-03-29 18:20:18.000000000 +0200:/var/crash/_usr_bin_apport-collect.1000.crash
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/apport-collect
InterpreterPath: /usr/bin/python2.6
Package: apport 0.146
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/apport-collect hal
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
PythonArgs: ['/usr/bin/apport-collect', 'hal']
SourcePackage: apport
Title: apport-collect crashed with ValueError in <module>()
Traceback:
 Traceback (most recent call last):
   File "/usr/bin/apport-collect", line 134, in <module>
     bug = lp.bugs[int(bug_number)]
 ValueError: invalid literal for int() with base 10: 'hal'
Uname: Linux 2.6.28-11-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy lpadmin netdev plugdev powerdev sambashare scanner vboxusers video

Revision history for this message
Arnaud Jeansen (ajeans) wrote :
Revision history for this message
Jon Charge (seropith) wrote :

I will attempt to reproduce this bug.

Changed in apport:
status: New → Incomplete
assignee: nobody → seropith
Revision history for this message
Jon Charge (seropith) wrote :

jon@central:~$ apport-collect hal
Logging into Launchpad...
Downloading bug...
Traceback (most recent call last):
  File "/usr/bin/apport-collect", line 134, in <module>
    bug = lp.bugs[int(bug_number)]
ValueError: invalid literal for int() with base 10: 'hal'
jon@central:~$

Revision history for this message
Jon Charge (seropith) wrote : apport-collect data

ApportLog:

Architecture: i386
CrashReports:
 600:1000:1000:40216385:2009-03-28 17:15:33.000000000 -0600:2009-03-28 17:15:34.000000000 -0600:/var/crash/_usr_lib_firefox-3.0.8_firefox.1000.crash
 600:1000:1000:8465:2009-03-29 10:41:25.000000000 -0600:2009-03-29 10:41:31.000000000 -0600:/var/crash/_usr_bin_apport-collect.1000.crash
 600:1000:1000:1619173:2009-03-29 00:37:47.000000000 -0600:2009-03-29 00:37:48.000000000 -0600:/var/crash/_usr_bin_ark.1000.crash
 600:1000:1000:12271:2009-03-24 21:46:14.000000000 -0600:2009-03-24 21:46:19.000000000 -0600:/var/crash/_usr_share_checkbox_run.1000.crash
 600:1000:1000:30168114:2009-03-28 17:33:02.000000000 -0600:2009-03-28 17:33:03.000000000 -0600:/var/crash/_usr_bin_stellarium.1000.crash
DistroRelease: Ubuntu 9.04
Package: apport 0.146
PackageArchitecture: all
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=en_US.UTF-8
Uname: Linux 2.6.28-11-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev root sambashare

Revision history for this message
Jon Charge (seropith) wrote :
Changed in apport:
assignee: seropith → nobody
status: Incomplete → Confirmed
Revision history for this message
Andreas Moog (ampelbein) wrote :

Setting to triaged, importance low as suggested by Jon.

Changed in apport (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Bernhard (b.a.koenig) wrote :

Just had the same problem:

> apport-collect xorg
Logging into Launchpad...
Downloading bug...
Traceback (most recent call last):
  File "/usr/bin/apport-collect", line 134, in <module>
    bug = lp.bugs[int(bug_number)]
ValueError: invalid literal for int() with base 10: 'xorg'

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

Should get a friendly help message instead.

Changed in apport (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Triaged → In Progress
Martin Pitt (pitti)
Changed in apport (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.0 KiB)

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

---------------
apport (1.1-0ubuntu1) karmic; urgency=low

  * New upstream release:
    - Drop some remaining distro specific pieces of code from non-backends.
    - Add hookutils methods for attaching relevant packages, greatly improve
      attach_alsa() for sound problem debugging.
    - Move launchpad crash database implementation from ever-breaking
      python-launchpad-bugs (screenscraping) to launchpadlib (official and
      stable Launchpad API). (LP: #353879)
    - Add new field Report.pid which gets set on add_proc_info() and can be
      used by hooks.
    - setup.py: Properly clean up all generated files, install missing
      mimetypes/text-x-apport.svg icon symlink.
    - Add README file.
    - Add translations from Launchpad.
    - Remove preloadlib/*; it's undermaintained, and not really useful any
      more these days.
    - Various bug fixes; most visible being the misnamed
      etc/default/apport.default file (which should just be
      etc/default/apport).
  * Merge some bug fixes from trunk:
    - launchpad.py: Send and read Date: field again, reverting r1128; it is
      useful after all. (LP: #349139)
    - report.py, add_proc_info(): Only add ProcAttrCurrent if it is not
      "unconfined".
    - ui.py: Detect invalid PIDs (such as for kernel processes) and give a
      friendly error message. (LP: #360608)
    - report.py, add_hooks_info(): Always run common hooks, and run source
      package hooks if we do not have a binary package name. (LP: #350131)
    - launchpad.py: Consider socket errors when connecting as transient, so
      that crash-digger doesn't stop completely on them.
  * Drop debian/apport.README.Debian, superseded by upstream README.
  * Drop debian/apport.links, done by upstream setup.py now.
  * debian/rules, debian/apport.preinst: Drop upgrade fix for misnamed default
    file again, was only necessary for intra-Jaunty upgrades.
  * debian/control: python-launchpad-bugs → python-launchpadlib dependencies.
  * debian/local/apport-collect: Drop launchpadlib login code, just use the
    CrashDatabase implementation from apport/crashdb_impl/launchpad.py.
  * Make package backportable to hardy and intrepid:
    - debian/control: Relax python-central buil-dependency to 0.5.6.
    - debian/rules: Determine DH_PYCENTRAL value ("include-links" vs.
      "nomove") based on the installed pycentral version.
    - debian/rules: Only supply --install-layout=deb when Python version is
      2.6.
  * apport/hookutils.py: Add docstring for attach_hardware, thanks Matt
    Zimmerman! (Merged from lp:~mdz/apport/hookutils)
  * apport/crashdb_impl/launchpad.py: Support older wadllib API
    where bug.date_created was a string instead of a datetime object.
    (Cherrypicked from trunk).
  * debian/control: Drop apport dependency to python-xdg, it's not required.
    (LP: #354172)
  * debian/control: Drop gdb from Depends: to Recommends:. (LP: #354172)
  * debian/local/apport-collect: Print a friendly error message instead of
    crashing if the bug number is not an integer. (LP: #351050)
  * debian/local/apport-collect: Change incomplete tasks back to "New" ...

Read more...

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.