← Back to team overview

desktop-packages team mailing list archive

[Bug 865199] Re: apport crashes when /etc/apport/native-origins.d contains any files.

 

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

---------------
apport (1.24-0ubuntu1) precise; urgency=low

  * New upstream release 1.23.1:
    - apport/crashdb.py: Ensure that duplicate table only has one entry per
      report ID.
    - apport-retrace: Pass correct executable path to gdb in --gdb with
      --sandbox mode.
    - apport-retrace: Do not leave behind temporary directories on errors.
    - apport-retrace: Drop assertion failure for existance of "Stacktrace".
      This isn't present in the case of gdb crashing, and there is not much we
      can do about it. This should not break the retracer.
    - apport/report.py: Unwind XError() from stack traces for the
      "StacktraceTop" field, as they take a significant part of the trace.
      This causes bugs to be duplicated which really have different causes.
  * New upstream release 1.24:
   - apport-retrace: Add --timestamp option to prepend a timestamp to log
     messages. This is useful for batch operations.
   - crash-digger: Call apport-retrace with --timestamps, to get consistent
     timestamps in log output.
   - hookutils.py: Add two new functions attach_gsettings_package() and
     attach_gsettings_schema() for adding user-modified gsettings keys to a
     report. (LP: #836489)
   - hookutils.py: Add new function in_session_of_problem() which returns
     whether the given report happened in the currently running XDG session.
     This can be used to determine if e. g. ~/.xsession-errors is relevant and
     should be attached.
   - backends/packaging-apt-dpkg.py, install_packages(): Also copy
     apt/sources.list.d/ into sandbox.
   - backends/packaging-apt-dpkg.py, install_packages(): Install apt keyrings
     from config dir or from system into sandbox. (LP: #856216)
   - packaging.py, backends/packaging-apt-dpkg.py: Define that
     install_packages() should return a SystemError for broken
     configs/unreachable servers etc., and fix the apt/dpkg implementation
     accordingly.
   - apport-retrace: Don't crash, just give a proper error message if servers
     are unreachable, or configuration files are broken. (LP: #859248)
   - backends/packaging-apt-dpkg.py: Fix crash when
     /etc/apport/native-origins.d contains any files. (LP: #865199)
   - hookutils, recent_logfile(): Fix invalid return value if log file is not
     readable. (LP: #819357)
   - test/crash: Fix race condition in the "second instance terminates
     immediately" check.
   - hookutils.py: Replace attach_gconf() with a no-op stub. It used static
     python modules like "gconf" which broke the PyGI GTK user interface, and
     gconf is rather obsolete these days.
   - ui.py, open_url(): Greatly simply and robustify by just using xdg-open.
     This already does the right thing wrt. reading the default browser from
     GNOME, KDE, XCE, and other desktops. (LP: #198449)
   - data/general-hooks/generic.py: Only attach ~/.xsession_errors if the bug
     is reported in the same XDG session as the crash happened. (LP: #869974)
   - Ignore crashes for programs which got updated in between the crash and
     reporting. (LP: #132904)
   - Special-case crashes of 'twistd': Try to determine the client program and
     assign the report to that, or fail with an UnreportableReason.
     (LP: #755025)
   - apport-gtk: In bug update mode, make details dialog resizable and fix
     default size. (LP: #865754)
   - apport-gtk: Fix crash if report does not have ProcCmdline. (LP: #854452)
   - hookutils.py, attach_wifi(): Anonymize ESSID and AP MAC from "iwconfig"
     output. (LP: #746900)
   - test/crash: Fix test failure if user is not in any system groups.
   - test/crash: Change to /tmp/ for test crash process, to fix failure if the
     user that runs the test suite cannot write into the current directory.
     (LP: #868695)
   - ui.py: Improve error message if package is not a genuine distro package.
     Thanks to Ronan Jouchet. (LP: #559345)
  * debhelper/dh_apport: Install debian/source.apport into the first binary
    package only, as per documentation. (LP: #687584)
  * debian/apport.upstart: Exit pre-start with 0 if apport is disabled, to
    avoid warning message about failed startup. (LP: #857086)
  * debian/control: Update Vcs-Bzr: for precise branch.
 -- Martin Pitt <martin.pitt@xxxxxxxxxx>   Wed, 19 Oct 2011 09:39:41 +0200

** Changed in: apport (Ubuntu)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/865199

Title:
  apport crashes when /etc/apport/native-origins.d contains any files.

Status in “apport” package in Ubuntu:
  Fix Released

Bug description:
    File "/usr/lib/python2.6/dist-packages/apport/REThread.py", line 34, in run
      self._retval = self.__target(*self.__args, **self.__kwargs)
    File "/usr/lib/python2.6/dist-packages/apport/ui.py", line 84, in thread_collect_info
      not apport.packaging.is_distro_package(report['Package'].split()[0])) \
    File "/usr/lib/python2.6/dist-packages/apport/packaging_impl.py", line 134, in is_distro_package
      for line in open(f):
  IOError: [Errno 2] Datei oder Verzeichnis nicht gefunden: 'firefox'

  A short look at the source shows that os.listdir is used, but the
  directory path is not joined onto the open:

          try:
              for f in os.listdir('/etc/apport/native-origins.d'):
                  for line in open(f):
                      line = line.strip()
                      if line:
                          native_origins.append(line)
          except OSError:
              pass

  Now, this is wrong on a number of issues:
  os.listdir returns only the basenames => so you need open(os.path.join("/etc/apport/native-origins.d", f))
  Furthermore, open raises an IOError, so the OSError only catches issues with os.listdir, so if it should cover the open too, it should be: except (OSError, IOError): # notice the tuple.

  Alternatively you can also use glob.glob("/etc/apport/native-
  origins.d/*"), that one includes the given path.

  Package version: 1.13.3-0ubuntu2
  Description:	Ubuntu 10.04.3 LTS
  Release:	10.04

  Expected behaviour: Bug reporter should not crash.
  What happened: apport crashed with a traceback.

  I can also provide a fix as a patch if needed, but it's rather a
  trivial thing, packaging it up as a new package is probably more work,
  the detailed description how to fix is above.

  Thanks, Andreas

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/865199/+subscriptions