Closed Bug 796880 Opened 13 years ago Closed 13 years ago

better diagnostics when parent terminates before children

Categories

(Testing :: Mozbase, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: markh, Unassigned)

Details

Attachments

(3 files, 2 obsolete files)

Attached patch better diags (obsolete) — Splinter Review
In bug 796840, there is a case where mozprocess gets upset if a parent process terminates while children are alive. The diagnostics in this case could be better - eg, listing the children PIDs would offer clues about what has gone wrong. This patch improves the messages printed in this case, including printing the child PIDs.
Attachment #666935 - Flags: review?(gps)
Attachment #666935 - Attachment is obsolete: true
Attachment #666935 - Flags: review?(gps)
Attachment #666940 - Flags: review?(gps)
Attachment #666940 - Attachment is obsolete: true
Attachment #666940 - Flags: review?(gps)
Attachment #666979 - Flags: review?(gps)
*sigh* - printing .keys() won't do the right thing in py3k IIRC - list(ob.keys()) will.
mozprocess is actually part of mozbase: https://wiki.mozilla.org/Auto-tools/Projects/MozBase ; it should be fixed in its repo and mirrored to m-c; :gps, mind if one of us steals this review?
Comment on attachment 666979 [details] [diff] [review] self.pid is what we need! Review of attachment 666979 [details] [diff] [review]: ----------------------------------------------------------------- Someone else should fix mozprocess issues. There is also bug 795427 around more useful error messages for mach. Perhaps _run_command should have a try..finally for trapping exit and cleaning up child processes better?
Attachment #666979 - Flags: review?(gps)
Component: mach → Mozbase
Product: Core → Testing
Version: 16 Branch → Trunk
Comment on attachment 667040 [details] [diff] [review] same as above but versus mozbase repo and with string formatting changes LGTM
Attachment #667040 - Flags: review?(wlachance) → review+
Seeing this is still open, I'll report this here. The code as checked in will cause: Traceback (most recent call last): File "o:\src\mm\mozilla-hg\mc-socialapi-landing\testing/mozbase/mozprocess\mozprocess\processhandler.py", line 297, in _procmgr self._poll_iocompletion_port() File "o:\src\mm\mozilla-hg\mc-socialapi-landing\testing/mozbase/mozprocess\mozprocess\processhandler.py", line 333, in _poll_iocompletion_port print >> sys.stderr, "PIDS: %s" % ', '.join(self._spawned_procs.keys()) TypeError: sequence item 0: expected string, long found So we probably need something like: print >> sys.stderr, "PIDS: %s" % ', '.join([str(p) for p in self._spawned_procs.keys()])
And we can just drop .keys() print >> sys.stderr, "PIDS: %s" % ', '.join([str(p) for p in self._spawned_procs])
Attached patch follow upSplinter Review
Attachment #668241 - Flags: review?(mhammond)
Comment on attachment 668241 [details] [diff] [review] follow up Looks good and WFM
Attachment #668241 - Flags: review?(mhammond) → review+
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: