Closed Bug 1192485 Opened 9 years ago Closed 9 years ago

mozregression can't handle independently terminated process

Categories

(Testing :: mozregression, defect)

42 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: raysatiro, Assigned: parkouss)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20150807030210

Steps to reproduce:

I'm using mozregression in both the command line 0.40 with Python 2.7.10 in Windows 7 x64 and also in the GUI 0.3 using mozregression 0.37. I'm establishing regression windows for Firefox but sometimes it terminates or I accidentally close it and the regression stops working.



Actual results:

In the case of the GUI it just hangs and nothing happens. In the case of the command line tool it says "OSError: Could not terminate process" and exits. This made establishing a regression window very difficult.


Expected results:

I think you should add something in both so that if a process terminates (either due to user or firefox terminates or crashes etc) the regression can still continue. I must've restarted my regression six times although with a smaller window each time.
Ray, Thanks a lot for reporting this issue!

Hm, I often close manually the browser (on Linux, less often on windows) and it works well in "normal" cases.

I suspect it is more in case the browser terminates in a hard way or crashes on Windows - and this is not expected by mozprocess:

https://dxr.mozilla.org/mozilla-central/source/testing/mozbase/mozprocess/mozprocess/processhandler.py#142

I will work on this (mozregression should definitely not crash for this), but I would like to be sure that the normal case (ie, the user closing the browser by clicking on the cross) works for you. Else, there is something else that I don't get yet. In that case, please copy paste a stack trace of the error you got with the command line, and provide me the exact command line you use and how you are closing the browser so I can try to reproduce and investigate.
Assignee: nobody → j.parkouss
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(raysatiro)
This is the command line only part of the equation. Some additional code is required for the GUI.

mozregression should not crash when trying to run a build now. In worst case, it will skip the erroneous build.


Copy paste of my commit message:

This handle cases when we got some exception while:

    1. trying to install the application
    2. trying to start the application
    3. trying to stop the application.

For cases 1 and 2, this is an "uncoverable" error. So the raw
exception is printed, and we force skipping the build.

Case 3 can be recovered, so the only thing we do is print the raw
error, but we keep the verdict that the user entered and the
app_info dict extracted from the installed application.
Attachment #8645629 - Flags: review?(wlachance)
Comment on attachment 8645629 [details] [review]
handle errors when running the tested application

This looks great, thanks!
Attachment #8645629 - Flags: review?(wlachance) → review+
I upgraded to mozregression-0.41. Although I still see "OSError: Could not terminate process" messages mozregression no longer terminates and I am able to continue the bisect. Thanks for your work fixing this issue. 

I notice I see this messages quite often:

Exception trying to use job objects;
falling back to not using job objects for managing child processes
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\mozprocess\processhandler.py", line 295, in _execute_child
    winprocess.AssignProcessToJobObject(self._job, int(hp))
  File "C:\Python27\lib\site-packages\mozprocess\winprocess.py", line 51, in ErrCheckBool
    raise WinError()
WindowsError: [Error 5] Access is denied.

I think if that fails the first time it should know it probably won't succeed any other time and fall back by default.

Also I realize this might not be the appropriate place but since I have your ear I was wondering where the best place is to ask questions about mozregression? Is there a forum or a board or a list?
Flags: needinfo?(raysatiro)
I'm glad the patch helps!

So looking at the stack trace, this seems to be a mozprocess error to me. We should report that in the right component.

I think the best place to ask questions about mozregression is on irc (irc.mozilla.org, channel #ateam). You can also find some information here:

http://mozilla.github.io/mozregression/


:wlach, do you agree with my answer here ? And should we open a mozprocess bug ?
Flags: needinfo?(wlachance)
(In reply to Julien Pagès from comment #6)

> :wlach, do you agree with my answer here ? And should we open a mozprocess
> bug ?

Yeah, I think resolving this bug and opening a mozprocess one makes sense. :)
Flags: needinfo?(wlachance)
Well, I suppose it is related to bug 1188863, so I won't open a new bug. Feel free to open a new one if I'm missing something.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
See Also: → 1188863
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: