← Back to team overview

apport-hackers team mailing list archive

[Merge] lp:~ev/apport/handle-disappearing-processes into lp:apport


Evan Dandrea has proposed merging lp:~ev/apport/handle-disappearing-processes into lp:apport.

Requested reviews:
  Apport upstream developers (apport-hackers)

For more details, see:

andle the parent process going away while we're attempting to read from proc. We're seeing quite a few crashes triggered by the pid being invalid:

Your team Apport upstream developers is requested to review the proposed merge of lp:~ev/apport/handle-disappearing-processes into lp:apport.
=== modified file 'data/recoverable_problem'
--- data/recoverable_problem	2014-05-14 20:58:42 +0000
+++ data/recoverable_problem	2014-09-22 14:50:16 +0000
@@ -37,7 +37,13 @@
         report.pid = os.getppid()
     # Grab PID info right away, as we don't know how long it'll stick around
-    report.add_proc_info(report.pid)
+    try:
+        report.add_proc_info(report.pid)
+    except ValueError as e:
+        # The process may have gone away before we could get to it.
+        if e.message == 'invalid process':
+            return
     # Get the info on the bug
     items = sys.stdin.read().split('\0')