Comment 5 for bug 1345569

Revision history for this message
Brian Murray (brian-murray) wrote :

This is fixed in trunk but hasn't landed in Utopic yet.

 $ bzr log -r2858.1.1 -p
------------------------------------------------------------
revno: 2858.1.1
committer: Evan Dandrea <email address hidden>
branch nick: handle-disappearing-processes
timestamp: Mon 2014-09-22 15:45:54 +0100
message:
  Handle the parent process going away while we're attempting to read from proc.
diff:
=== modified file 'data/recoverable_problem'
--- data/recoverable_problem 2014-05-14 20:58:42 +0000
+++ data/recoverable_problem 2014-09-22 14:45:54 +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')