Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phantomjs processes are not killed correctly on error #251

Closed
bobvandenberge opened this issue Mar 14, 2017 · 8 comments
Closed

Phantomjs processes are not killed correctly on error #251

bobvandenberge opened this issue Mar 14, 2017 · 8 comments

Comments

@bobvandenberge
Copy link
Contributor

bobvandenberge commented Mar 14, 2017

We noticed all resources on our server were used up by phantom phantomjs processes (how ironic ;)). When investigating, we found at that stryker doesn't always kill the phantomjs process. It doesn't kill it properly when we see the following error

[2017-03-14 14:20:23.500] [WARN] IsolatedTestRunnerAdapter - Received unexpected message from test runner worker process: "result" while current task is dispose. Ignoring this message.

The error can happen multiple times per run. Most of the time it will go wrong in an exponential fashion. In the beginning it fails one, then it fails a little bit more often and in the end all tests will fail with this error all the time. '

I think this is a raise condition because only a few runs have this trouble, not all runs.

Versions:
"grunt-stryker": "^0.1.0",
"stryker": "^0.5.6",
"stryker-api": "^0.4.2",
"stryker-html-reporter": "^0.3.0",
"stryker-jasmine": "^0.1.0",
"stryker-karma-runner": "^0.3.3",

@nicojs
Copy link
Member

nicojs commented Mar 14, 2017

@Bobvdb thanks for reporting this issue!

The versions you print are taken from your package.json file, correct? Could you please provide information on the actually installed versions? ($ npm ls | grep stryker should do the trick)

I might have found the, if your are indeed using v0.3.3 of stryker-karma-runner. That version disposes any karma processes when stryker asks it to dispose. The problem is: it closes the karma process itself and (i think) not any browser processes. We removed it in later versions.

Could you please install the latest versions of all dependencies?

@bobvandenberge
Copy link
Contributor Author

Below you can find the list of installed packages with their version.
├── grunt-stryker@0.1.0
├─┬ UNMET PEER DEPENDENCY stryker@0.5.6
├── stryker-api@0.4.2
├─┬ stryker-html-reporter@0.3.0
├── stryker-jasmine@0.1.0
├─┬ stryker-karma-runner@0.3.3
npm ERR! peer dep missing: stryker@^0.3.1, required by grunt-stryker@0.1.0

As you can see we are indeed using stryker-karma-runner 0.3.3. I'll update it and see if the problem still occurs than.

@bobvandenberge
Copy link
Contributor Author

I updated all the libraries but the problem is still there. Below the output of the npm ls | grep stryker.

├── grunt-stryker@0.4.1
├─┬ stryker@0.5.9
├── stryker-api@0.4.2
├─┬ stryker-html-reporter@0.3.0
├── stryker-jasmine@0.1.0
├─┬ stryker-karma-runner@0.3.5

@bobvandenberge
Copy link
Contributor Author

bobvandenberge commented Mar 20, 2017

@nicojs The information off the debug session:

[2017-03-20 12:44:42.990] [ERROR] IsolatedTestRunnerAdapter - TRUE timeouthandler
Mutation testing [============== ] 34% (ETC 1102.5s)[527 killed] [56 survived] [0 no coverage] [1 timeout] [0 error][2017-03-20 12:44:43.610] [DEBUG] EventRecorderReporter - Writing event onMutantTested to file reports/mutation/events/00668-onMutantTested.json
[2017-03-20 12:44:44.016] [WARN] IsolatedTestRunnerAdapter - Received unexpected message from test runner worker process: "result" while current task is dispose. Ignoring this message.
[2017-03-20 12:44:44.017] [ERROR] IsolatedTestRunnerAdapter - Received DisposeDone
[2017-03-20 12:44:44.017] [ERROR] IsolatedTestRunnerAdapter - Sturen SIGKILL: undefined

@nicojs
Copy link
Member

nicojs commented Apr 6, 2017

@Lepetere also has this issue, he created a small project which recreates this issue on linux. I forked it here https://github.com/nicojs/UnitTestCourse. Thanks @Lepetere!

I just had a major breakthrough. We kill child test runner processes with .kill('SIGKILL'). Apparently changing it to kill() fixes the issue. We will fix this tomorrow and release a new version.

@simondel
Copy link
Member

simondel commented Apr 7, 2017

We'll ship this (hopefully soon) in the next major release

@simondel
Copy link
Member

simondel commented Apr 22, 2017

This has been released with Stryker 0.6.0 👍

@Lepetere
Copy link

Thanks for getting this fixed guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants