Closed Bug 1056192 Opened 5 years ago Closed 5 years ago

aborting gaia-integration tests leaves some processes running


(Testing Graveyard :: JSMarionette, defect)

Not set


(Not tracked)



(Reporter: mdas, Assigned: mdas)



(Whiteboard: [runner][device][emulator])


(1 file)

I noticed that if I Cmd+C'd the gaia-integration process while tests were running, there would still be some node processes running well after my shell returned. We should ensure that when termination/kill signals are received, we terminate all subprocesses.
Attached file link to PR
Mind reviewing this?
Assignee: nobody → mdas
Attachment #8492435 - Flags: review?(ahalberstadt)
Comment on attachment 8492435 [details] [review]
link to PR

Heh, yeah that always bugged me. I don't know why I didn't fix it sooner..

This looks good, but shouldn't we re-raise the exception? r+ with that fixed.
Attachment #8492435 - Flags: review?(ahalberstadt) → review+
lol I just tested raising the exception and it doesn't kill the js processes. I guess raising the exception kills the python process that sends the message over the pipe :(

Will investigate at a time that isn't 11pm on a friday :)
Whiteboard: [runner]
Whiteboard: [runner] → [runner][device][emulator]
If we raise an exception in the listener, the file sees it, and kills the spawned 'make' call command and exits. When it does that, there are still rogue js processes alive. I tried have the listener send a message to the morionette_socket_host when it got a BaseException, by adding an appropriate handler to the marionette_socket_host, but even then it would only kill a few more, leaving the _mocha process (forked by childrunner) alive. Not only was this taking a long time and was a bit convoluted, I realized that working on Bug 1056194 would be an easier and more appropriate fix. I've switched focus to that and will resolve wontfix this when that lands.
fixed by Bug 1056194
Closed: 5 years ago
Resolution: --- → FIXED
Reopening because we now have a remaining python process alive in Linux only. The "trap" command isn't respected when the bash file it's contained in is called by Makefile in ubuntu 14.04, so if we SIGINT, we don't kill the spawned process. If I call gaia-marionette directly, trap is respected, but if called through make, the trap isn't performed.

This works perfectly fine on OS X though...
Resolution: FIXED → ---
I'm on 14.04 LTS if I can be of assistance.
fixed a by-product of Bug 1088835
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.