Closed Bug 1451310 Opened 6 years ago Closed 6 years ago

[mozrunner] RuntimeError('Calling poll() on a non started process is not allowed.) in BaseRunner.cleanup()

Categories

(Testing :: Mozbase, defect, P1)

defect

Tracking

(firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Attachments

(1 file)

Today I have seen that when mozrunner tries to create a new ProcessHandler instance but then fails to run it, the following assertion is shown in `cleanup()`:

https://dxr.mozilla.org/mozilla-central/source/testing/mozbase/mozrunner/mozrunner/base/runner.py#128-129

> Exception RuntimeError: RuntimeError('Calling poll() on a non started process is not allowed.',) in <bound method GeckoRuntimeRunner.__del__ of <mozrunner.base.browser.GeckoRuntimeRunner object at 0x1064f6d90>> ignored

In this case the problem is that the call to 'self.Process()' in processhandler.py fails and `self.proc` is not getting set. Then in the above `start()` method the retrieval of the pid in line 132 fails.
I have to admit that the last part of my first comment is wrong. In case of `self.Process()` fails an exception is thrown which bubbles up to `start()` and higher, so the `pid` will not be retrieved. But some harnesses run a cleanup of the runner at the end of the test run, and as such fail.

It can be reproduced when modifying mozprofile to always have a Unicode char in the profile path, and then by running `mach crashtest`.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: -- → P1
Comment on attachment 8964903 [details]
Bug 1451310 - [mozrunner] Catch exceptions when starting the client process.

https://reviewboard.mozilla.org/r/233642/#review239418

Thanks, lgtm
Attachment #8964903 - Flags: review?(ahalberstadt) → review+
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s c26f5209b48f725a4eac9debbe747fb062de77b7 -d dfc311c89e45: rebasing 456148:c26f5209b48f "Bug 1451310 - [mozrunner] Catch exceptions when starting the client process. r=ahal" (tip)
merging testing/mozbase/mozrunner/mozrunner/base/runner.py
warning: conflicts while merging testing/mozbase/mozrunner/mozrunner/base/runner.py! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
I have to wait until my patch from bug 1451246 got merged to mozilla-central to be able to rebase.
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6c61adc663f6
[mozrunner] Catch exceptions when starting the client process. r=ahal
Blocks: 1451680
https://hg.mozilla.org/mozilla-central/rev/6c61adc663f6
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: