Closed Bug 1245332 Opened 4 years ago Closed 4 years ago

Mozregression hangs if I restart browser (in different e10s state or with add-ons disabled/enabled)


(Testing :: mozregression, defect)

Not set


(Not tracked)



(Reporter: arni2033, Assigned: parkouss)




(1 file)

Mozregression GUI version 0.8.1   using mozregression version 2.2.1

1. Start new bisection between 2016-01-01 and 2016-01-05 (firefox)
2. When browser launches, click Menu (≡) -> [?] -> Restart with Add-ons Disabled
3. When browser restarts, click "Evaluate" button in mozregression

AR:  mozregression GUI hangs for ~1-2 minutes
ER:  No hang

This is long-standing bug. I don't know if this should be wontfix'ed.
Oh, this does happen on windows, but not on linux.

Mozregression should not hang for this - it is a bug we should try to solve.
So, the slowdown is in mozprocess,

in "self.returncode = winprocess.GetExitCodeProcess(self._handle)" line.

Not sure what we can do about that yet, this is a call in the windows API. From the mozregression side, we could possibly implement a workaround: running the mozrunner.stop() method in a thread (in, wait a bit for its termination (say 300 ms). If it does not complete, just return to the main thread and go on, leaving that thread the required time to complete (or not in case we close the program before).

If we implement that workaround, we should only do that for the impacted OS (e.g, windows).
Note for myself:

In mozzprocess, I can fix it with the following code in the if block:

>                    winprocess.TerminateJobObject(self._job, winprocess.ERROR_CONTROL_C_EXIT)
>                    rc = winprocess.WaitForSingleObject(self._handle, 350)
>                    if rc == winprocess.WAIT_TIMEOUT:
>                        self.return_code = 127  # do not wait anymore
>                    else:
>                        self.returncode = winprocess.GetExitCodeProcess(self._handle)

Though I don't know if it is a right fix for mozprocess.
So, this appears in mozregression console too (windows only again).

I had a discussion with :ahal, looks like it is not trivial to fix that in mozprocess directly. I'm inclined to write a workaround in mozregression for this special case.
Summary: [gui] Mozregression hangs if I restart browser (in different e10s state or with add-ons disabled/enabled) → Mozregression hangs if I restart browser (in different e10s state or with add-ons disabled/enabled)
OS: Unspecified → Windows
Hey Andrew, since :wlach is not here - and that we talked about that - I'm asking you for a review :) This is quite simple (I don't think it requires any mozregression knowledge) and working well from what I have tested.

With that, the GUI will only block for 0.7 seconds max, which is acceptable.
Assignee: nobody → j.parkouss
Attachment #8715788 - Flags: review?(ahalberstadt)
Comment on attachment 8715788 [details] [review]
do not block when stopping firefox

Lgtm! Left a nit comment on the PR.
Attachment #8715788 - Flags: review?(ahalberstadt) → review+

Fixed and landed in
Closed: 4 years ago
Resolution: --- → FIXED
See Also: → 1248767
You need to log in before you can comment on or make changes to this bug.