Open Bug 1188863 Opened 4 years ago Updated 4 years ago

[mozprocess] mozprocess fail sometimes to kill a process under windows (OSError: Could not terminate process )


(Testing :: Mozbase, defect)

Not set


(Not tracked)


(Reporter: parkouss, Unassigned)




(1 file)

Attached file
So, we can see this kind of issue in bug 1171418 for example.

After some digging, I found an interesting post about that (from a buildbot issue):

which can redirect you to

and where you can find an implementation of a safe_terminate for windows which possibly fix the issue. (I attached it).

I think we should investigate this, at least it is probably not bad to fallback using this method when we fail with the current implementation.

:ahal, thoughts ?
Also, there is an other issue from that. If you call .wait(), and that a thread in parallel call kill and fail like described here, then wait() will return None; so the error in the thread is printed, but if nobody check the errcode to be something different than None then the execution continue - but the process is not terminated (and I assume a wait() call should either return when the process is terminated, or raise an exception).

See bug 1171418 comment 19, the print log show that (INFO : Browser exited with error code: None).
Attachment #8640471 - Attachment mime type: application/python → text/plain
See Also: → 1192485
You need to log in before you can comment on or make changes to this bug.