apport-retrace crashed with IOError in open_unknown()

Bug #315797 reported by tdflanders
6
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Binary package hint: apport

thomas@thomas-laptop:~$ lsb_release -rd ; uname -a ; apt-cache policy linux apport-retrace
Description: Ubuntu jaunty (development branch)
Release: 9.04
Linux thomas-laptop 2.6.28-00004-g7d55917-dirty #1 SMP Thu Jan 8 08:07:10 GMT 2009 i686 GNU/Linux
linux:
  Installed: 2.6.28.4.4
  Candidate: 2.6.28.4.4
  Version table:
 *** 2.6.28.4.4 0
        500 http://archive.ubuntu.com jaunty/restricted Packages
        100 /var/lib/dpkg/status
apport-retrace:
  Installed: 0.126
  Candidate: 0.126
  Version table:
 *** 0.126 0
        500 http://archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status
thomas@thomas-laptop:~$

ProblemType: Crash
Architecture: i386
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/apport-retrace
InterpreterPath: /usr/bin/python2.5
Package: apport-retrace 0.126
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/apport-retrace -g /var/crash/_usr_lib_firefox-3.0.5_firefox.1000.crash
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_GB.UTF-8
PythonArgs: ['/usr/bin/apport-retrace', '-g', '/var/crash/_usr_lib_firefox-3.0.5_firefox.1000.crash']
SourcePackage: apport
Title: apport-retrace crashed with IOError in open_unknown()
Uname: Linux 2.6.28-00004-g7d55917-dirty i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Tags: apport-crash
Revision history for this message
tdflanders (thomasdelbeke) wrote :
Revision history for this message
tdflanders (thomasdelbeke) wrote :
Download full text (3.9 KiB)

Hi,

This is reproducible:

root@thomas-laptop:/var/crash# apport-retrace -g ./*firefox*
WARNING: libssl0.9.8 version 0.9.8g-14ubuntu2 required, but 0.9.8g-15ubuntu1 is available
WARNING: package libselinux1-dbgsym not available
WARNING: package perl-base-dbgsym not available
WARNING: package libgcc1-dbgsym not available
WARNING: package firefox-3.0-branding-dbgsym not available
WARNING: package whiptail-dbgsym not available
WARNING: package libdb4.7-dbgsym not available
WARNING: package libgdbm3-dbgsym not available
WARNING: package gcc-4.3-base-dbgsym not available
WARNING: package sed-dbgsym not available
WARNING: package libnewt0.52-dbgsym not available
WARNING: libgnutls26-dbgsym version 2.4.2-4 required, but 2.4.1-1ubuntu0.2 is available
WARNING: package libuuid1-dbgsym not available
WARNING: package libcomerr2-dbgsym not available
WARNING: x11-common version 1:7.4~5ubuntu9 required, but 1:7.4~5ubuntu10 is available
WARNING: package python2.5-dbgsym not available
WARNING: package libbz2-1.0-dbgsym not available
WARNING: package libdb4.6-dbgsym not available
WARNING: package debianutils-dbgsym not available
WARNING: libc6 version 2.9-0ubuntu6 required, but 2.9-0ubuntu7 is available
WARNING: package cpp-dbgsym not available
WARNING: libc6-dbgsym version 2.9-0ubuntu6 required, but 2.9-0ubuntu7 is available
WARNING: libssl0.9.8-dbgsym version 0.9.8g-14ubuntu2 required, but 0.9.8g-15ubuntu1 is available
WARNING: package perl-dbgsym not available
WARNING: sun-java6-bin-dbgsym is not available
WARNING: libaudiofile0-dbgsym is not available
WARNING: libselinux1-dbgsym is not available
Traceback (most recent call last):
  File "/usr/bin/apport-retrace", line 466, in <module>
    options.unpack_only, options.no_dpkg, options.extra_packages)
  File "/usr/bin/apport-retrace", line 291, in install_missing_packages
    pkg = apport.packaging.get_file_package(l, True)
  File "/usr/lib/python2.5/site-packages/apport/packaging_impl.py", line 210, in get_file_package
    return self._search_contents(file, map_cachedir)
  File "/usr/lib/python2.5/site-packages/apport/packaging_impl.py", line 370, in _search_contents
    urllib.urlretrieve(url, map)
  File "/usr/lib/python2.5/urllib.py", line 89, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/usr/lib/python2.5/urllib.py", line 222, in retrieve
    fp = self.open(url, data)
  File "/usr/lib/python2.5/urllib.py", line 187, in open
    return self.open_unknown(fullurl, data)
  File "/usr/lib/python2.5/urllib.py", line 199, in open_unknown
    raise IOError, ('url error', 'unknown url type', type)
IOError: [Errno url error] unknown url type: 'cdrom'
Exception exceptions.ImportError: ImportError('No module named shutil',) in <bound method __AptDpkgPackageInfo.__del__ of <apport.packaging_impl.__AptDpkgPackageInfo instance at 0x83f8dac>> ignored
root@thomas-laptop:/var/crash# chmod 777 -cR .
mode of `./_usr_bin_apport-retrace.0.crash' changed to 0777 (rwxrwxrwx)
root@thomas-laptop:/var/crash# chown 1000 -cR .
changed ownership of `./_usr_bin_apport-retrace.0.crash' to 1000
root@thomas-laptop:/var/crash# ls -la
total 36544
drwxrwxrwx 2 thomas root 4096 2009-01-10 13...

Read more...

Revision history for this message
tdflanders (thomasdelbeke) wrote :

So much for that:

root@thomas-laptop:/var/crash# ls -la
total 36544
drwxrwxrwx 2 thomas root 4096 2009-01-10 13:54 .
drwxr-xr-x 16 root root 4096 2008-12-28 15:12 ..
-rwxrwxrwx 1 thomas root 234227 2009-01-08 04:59 bugzilla3.0.crash
-rwxrwxrwx 1 thomas root 98761 2009-01-05 23:58 chillispot.0.crash
-rwxrwxrwx 1 thomas root 0 2009-01-10 09:50 .lock
-rwxrwxrwx 1 thomas root 19677 2009-01-10 13:55 _usr_bin_apport-retrace.0.crash
-rwxrwxrwx 1 thomas thomas 17610 2009-01-09 02:57 _usr_bin_apport-retrace.1000.crash
-rwxrwxrwx 1 thomas thomas 49991 2009-01-10 10:41 _usr_bin_bzr-notify.1000.crash
-rwxrwxrwx 1 thomas thomas 26075 2009-01-10 10:41 _usr_bin_conduit.1000.crash
-rwxrwxrwx 1 thomas thomas 36892858 2009-01-09 02:32 _usr_lib_firefox-3.0.5_firefox.1000.crash
root@thomas-laptop:/var/crash# apt-get install apport-retrace
Reading package lists... Done
Building dependency tree
Reading state information... Done
apport-retrace is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@thomas-laptop:/var/crash# apt-get install apport-retrace-dbgsym
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package apport-retrace-dbgsym
root@thomas-laptop:/var/crash# apt-get install apport-retrace-dbg
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package apport-retrace-dbg
root@thomas-laptop:/var/crash# apt-cache search apport-retrace | grep "dbg"
root@thomas-laptop:/var/crash# apport-retrace -g ./*apport*.0.*
report file does not contain required fields: CoreDump Package ExecutablePath
root@thomas-laptop:/var/crash# apport-retrace -g ./*apport*.1000.*
report file does not contain required fields: CoreDump Package ExecutablePath
root@thomas-laptop:/var/crash#

Revision history for this message
tdflanders (thomasdelbeke) wrote :

Doesn't work ...

root@thomas-laptop:/var/crash# gdb apport-retrace 2>&1 | tee gdb-apport-retrace.txt
GNU gdb 6.8-debian
Copyright (C) 2008 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"...
"/usr/bin/apport-retrace": not in executable format: File format not recognized
(gdb) handle SIG33 pass nostop noprint
Signal Stop Print Pass to program Description
SIG33 No No Yes Real-time event 33
(gdb) set pagination 0
(gdb) set logging file gdb-apport-retrace.log
(gdb) set logging on
Copying output to gdb-apport-retrace.log.
(gdb) run -g /var/crash/ _usr_lib_firefox-3.0.5_firefox.1000.crash
Starting program: -g /var/crash/ _usr_lib_firefox-3.0.5_firefox.1000.crash
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) run exec-file /usr/bin/apport-retrace -g /var/crash/ _usr_lib_firefox-3.0.5_firefox.1000.crash
Starting program: exec-file /usr/bin/apport-retrace -g /var/crash/ _usr_lib_firefox-3.0.5_firefox.1000.crash
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) run exec-file /usr/bin/apport-retrace -g /var/crash/_usr_lib_firefox-3.0.5_firefox.1000.crash
Starting program: exec-file /usr/bin/apport-retrace -g /var/crash/_usr_lib_firefox-3.0.5_firefox.1000.crash
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) run -g /var/crash/_usr_lib_firefox-3.0.5_firefox.1000.crashStarting program: -g /var/crash/_usr_lib_firefox-3.0.5_firefox.1000.crash
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) exec-file /usr/bin/apport-retrace -g /var/crash/_usr_lib_firefox-3.0.5_firefox.1000.crash
"/usr/bin/apport-retrace": not in executable format: File format not recognized
(gdb) exec /usr/bin/apport-retrace -g /var/crash/_usr_lib_firefox-3.0.5_firefox.1000.crash
"/usr/bin/apport-retrace": not in executable format: File format not recognized
(gdb) quit
root@thomas-laptop:/var/crash#

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

Don't worry about -dbgsym or gdb, apport is written in Python.

The problem here is in backends/packaging-apt-dpkg.py, _get_mirror(); it grabs the first deb line out of /etc/apt/sources to determine the mirror to download Contents.gz from. This needs to be fixed to only consider http:// URLs.

Changed in apport:
importance: Undecided → Medium
status: New → Triaged
Martin Pitt (pitti)
Changed in apport:
assignee: nobody → pitti
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 0.142

---------------
apport (0.142) jaunty; urgency=low

  * apport/report.py: Do not include lsb_release's stderr in the
    DistroRelease: output.
  * apport/hookutils.py: Fix attach_printing():
    - Correct spelling or "error_log".
    - Do not call fgrep with no file names (if /etc/cups/ppd/ is empty), since
      that hangs forever.
  * apport/report.py, _gen_stacktrace_top(): Fix parsing of stacktraces
    with some addresses missing. Add test cases. (LP: #269133)
  * apport/ui.py, run_report_bug(): Show details of collected information and
    give the user a chance to cancel. Previously, collected data was sent
    directly to Launchpad. Nowadays lots of packages have hooks, so we cannot
    guarantee any more that bug reports only have non-sensitive information.
    (LP: #195514) This also allows the user to cancel if (s)he inadvertedly
    clicked on "Report a problem". (LP: #279033)
  * apport/ui.py: Fix crash in get_complete_size() for reports that are
    constructed on the fly instead of loaded from a file (i. e. for bug
    reports). Fixes displaying of report in apport-cli.
  * apport/report.py: Slight robustification of test_add_gdb_info_script()
    test case.
  * debian/local/ubuntu-bug: Fix invocation with "--help". (LP: #305841)
  * apport/ui.py, load_report(): Clearer error message if report file does not
    exist. (LP: #204198)
  * Remove redundant verbiage from test suite docstrings.
  * apport/report.py, anonymize(): Fix crash when processing root-owned
    reports. (LP: #338033)
  * apport/report.py, anonymize(): Do not anonymize single-character user and
    host names, since they create an utter mess in bug reports, and also are
    very low-sensitive.
  * debian/apport.init: Also start apport if force_start=1 is given. This
    provides a convenient method of starting apport just for a session without
    changing the default file. Add a comment to debian/apport.default about
    this possibility. Thanks to Milan for the suggestion and the initial
    patch! (LP: #320467)
  * backends/packaging-apt-dpkg.py, _get_mirror(): Only consider http://
    mirrors for fetching Contents.gz. (LP: #315797)

 -- Martin Pitt <email address hidden> Thu, 05 Mar 2009 17:01:05 +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.