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

Does not abort all threads when interrupted by Ctrl-C #1393

Closed
tali opened this issue Oct 16, 2014 · 7 comments
Closed

Does not abort all threads when interrupted by Ctrl-C #1393

tali opened this issue Oct 16, 2014 · 7 comments
Labels
type: bug a defect, confirmed by a maintainer

Comments

@tali
Copy link

tali commented Oct 16, 2014

When one test hangs and I try to abort it with Ctrl-C, then at least some thread(s) are still running.

Sometimes I get a FATAL ERROR: JS Allocation failed - process out of memory error, but only quite some time after the next shell prompt is shown.
I also had some test cases which did not produce this error message and simply kept running at 100% CPU until I killed them explicitly.

Reproduced with:

    it 'loops', ->
      loop 'endless'

Environment:

  • node v0.10.29
  • mocha 1.21.4
  • OS X Yosemite
@boneskull boneskull added Unconfirmed status: waiting for author waiting on response from OP - more information needed labels Oct 17, 2014
@boneskull
Copy link
Contributor

please provide reproducing code in javascript.

@tali
Copy link
Author

tali commented Oct 17, 2014

  • cat loop.js

it('loops', function() {
  while(true) { }
})
  • mocha loop.js


^Czsh: exit 130   mocha loop.js
  • ps

  PID TTY           TIME CMD
 1652 ttys005    0:13.00 node /usr/local/lib/node_modules/mocha/bin/_mocha loop.js

@dasilvacontin
Copy link
Contributor

I was able to reproduce the bug.

@boneskull boneskull added type: bug a defect, confirmed by a maintainer and removed status: waiting for author waiting on response from OP - more information needed Unconfirmed labels Oct 18, 2014
travisjeffery pushed a commit that referenced this issue Dec 1, 2014
resolves #1393: kill children with more effort on SIGINT
@hpurmann
Copy link

I have the exact same bug. Mocha 2.0.1, OSX 10.10.1, using CoffeScript
mocha --compilers coffee:coffee-script/register

@dasilvacontin
Copy link
Contributor

@hpurmann, the fix didn't make it to the 2.0.1 bump. Could you please try to replicate the bug using master?

@hpurmann
Copy link

Just tried with master, works. Thanks! I should have tried master before.

@dasilvacontin
Copy link
Contributor

Good to know that it works now!

tandrewnichols pushed a commit to tandrewnichols/mocha that referenced this issue Dec 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants