only run one apport process at a time

Bug #119622 reported by Daniel Hahler
10
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Binary package hint: apport

I currently have problems on my server (probably due to a custom compiled PHP segfaulting) and apport made it even worse:
I've stopped Apache and this seemed to cause all or most of the running fastcgi-childs (~40) to segfault.

I've seen a lot of simultaneous lsb_release/apt-cache processes in "top" and then the server stopped responding. From a "recovery console" (serial tty) I've seen
  [19143.422977] Killed process 32303 (apt-cache)
  [19155.025718] Out of memory: kill process 32319 (apt-cache) score 56802 or a child
  [19155.040697] Killed process 32319 (apt-cache)
  [19164.245754] Out of memory: kill process 32334 (apt-cache) score 56802 or a child
  [19164.260799] Killed process 32334 (apt-cache)
  ...
  [19319.410104] Out of memory: kill process 32341 (apt-cache) score 56802 or a child
  [19319.425092] Killed process 32341 (apt-cache)

Then I had to trigger a hard reset and disabled apport.

IMHO apport should make sure to not cause any more trouble as there's already: e.g. if there are X running apport processes already, skip the current one. E.g., especially calling "lsb_release" seems to be quite an expensive operation.

Martin Pitt (pitti)
Changed in apport:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in bzr head.

Changed in apport:
assignee: nobody → pitti
status: Confirmed → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :
Download full text (3.2 KiB)

apport (0.94) gutsy; urgency=low

  * doc/data-format.tex: Some updates to incorporate feedback from Gnome
    upstream:
    - Do not talk about "Distributions" any more, but "Operating systems".
      Gnome is used on non-Linux OSs, too.
    - Split "DistroRelease:" field into "OS:" and "OSRelease:".
    - Explicitly mention that CoreDump, StackTrace etc. can also contain
      minidump output.
    - Increase document version to 0.2.
  * apport/report.py, obsolete_packages(): Fix crash when apt does not know an
    available version of a package. (LP: #128176)
  * test-apport: Add check that apport aborts immediately if another apport
    instance is already running. Also test that a symlink attack on the lock
    file is not possible.
  * bin/apport: Abort running several apport instances at the same time, by
    lockf()'ing /var/crashes/.lock and aborting on failure. (LP: #119622)
  * Add bin/gcc_ice_hook: Script to create an apport report for a gcc ICE
    (internal compiler exception). Add test cases to test-hooks, and ship it
    in the 'apport' package. (LP: #125551)
  * run-tests: In 'local' mode, only explicitly run the apt/dpkg
    implementation instead of backends/*, since the RPM ones don't have tests
    yet.
  * apport/crashdb.py: Add a second optional parameter to upload() to specify
    an upload progress callback function. Adapt the declarations in the
    Launchpad and Memory implementations, too.
  * apport/crashdb_impl/launchpad.py, upload(): Pass upload progress callback
    handler to launchpadBugs.storeblob.upload(), which supports this since
    version 0.2~39. Bump dependency to it accordingly.
  * apport/ui.py, file_report(): Define an upload progress callback handler,
    pass it to the crashdb upload(), and feed ui_set_upload_progress() with
    some actual data. (LP: #91521)
  * problem_report.py: Remove support for reading bz2 compressed binary data.
    That was only relevant during edgy's development cycle.
  * apport/report.py, test_add_proc_info(): Fix determination of /bin/zgrep
    interpreter.
  * problem_report.py: Switch encoding of binary values from bare zlib to
    proper gzip format, since this is much more useful when reusing the
    compressed value. Retain support for zlib-only reports. Add test cases for
    both old and new encodings, and adapt the other test cases for the new
    format. Update doc/data-format.tex accordingly.
  * problem_report.py, write(): Add new permitted 'binary' argument value
    'compressed', which retains gzip compressed binary values instead of
    unpacking them transparently. Add test cases.
  * problem_report, write_mime(): Eliminate unnecessary usage of StringIO.
  * problem_report, write_mime(): Make function work for compressed binary
    values. Add test case.
  * apport/report.py, add_gdb_info(): Make function work if CoreDump is a
    compressed value.
  * apport/ui.py: Load crash report with keeping compressed binaries. This
    avoids loading the entire uncompressed core dump into memory, and avoids
    recompressing it all over again for generating the crash database upload
    MIME document. This greatly speeds up crash reporting, too. (LP: #98562)

 -- ...

Read more...

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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