mozprocess waits for output despite exception
Categories
(Testing :: Mozbase, defect)
Tracking
(firefox88 fixed)
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: aerickson, Assigned: gbrown)
References
Details
Attachments
(3 files)
I found a failed browsertime linux job that waited an hour to fail, despite browsertime failing to start and throwing an exception almost immediately. mozprocess ignored the exception and continued to wait for output for an hour.
It seems like mozprocess should exit immediately on an exception. Or should browsertime be using a different functions or args with mozprocess?
Log attached (task https://firefox-ci-tc.services.mozilla.com/tasks/fME8UIgGSROwv6ADaXAaNg/runs/1).
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
afaik, mozprocess makes no promises about its behavior when, as happens here, a line handler (stdoutProcessLine, stdout_callback) throws an exception. It looks to me like the exception is not handled, and the ProcessReader thread ends; other mozprocess threads continue. My initial reaction is that raptor's line handler should not throw an exception, but rather signal mozprocess to end, perhaps with kill()?
Assignee | ||
Comment 2•3 years ago
|
||
...and mozprocess should catch and report the exception, but not end...maybe?
Assignee | ||
Comment 3•3 years ago
|
||
I can follow-up on those ideas, if no one else is interested.
Assignee | ||
Comment 4•3 years ago
|
||
The python subprocess module keeps getting better, while mozprocess is poorly
maintained and subject to various problems (like this bug!), so this patch
adds a comment to mozprocess warning about shortcomings.
Reporter | ||
Comment 5•3 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #1)
afaik, mozprocess makes no promises about its behavior when, as happens here, a line handler (stdoutProcessLine, stdout_callback) throws an exception. It looks to me like the exception is not handled, and the ProcessReader thread ends; other mozprocess threads continue. My initial reaction is that raptor's line handler should not throw an exception, but rather signal mozprocess to end, perhaps with kill()?
Agreed. I'll file a raptor bug. Thanks. :)
Assignee | ||
Updated•3 years ago
|
Pushed by whole.grains@protonmail.com: https://hg.mozilla.org/integration/autoland/rev/7fe4781d1bdd Add comment to mozprocess warning about shortcomings; r=jmaher
Comment 7•3 years ago
|
||
bugherder |
Assignee | ||
Comment 8•3 years ago
|
||
Catch and report any exceptions raised in mozprocess callbacks. This allows the
ProcessReader thread to continue and mozprocess to function normally following
an exception raised in client code.
Assignee | ||
Updated•3 years ago
|
Pushed by whole.grains@protonmail.com: https://hg.mozilla.org/integration/autoland/rev/8c7a7a88444f Handle exceptions in mozprocess callbacks; r=jmaher
Comment 10•3 years ago
|
||
bugherder |
Description
•