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

Hanging after assert.deepEqual #1915

Closed
flippmoke opened this issue Oct 7, 2015 · 4 comments
Closed

Hanging after assert.deepEqual #1915

flippmoke opened this issue Oct 7, 2015 · 4 comments
Labels
invalid not something we need to work on, such as a non-reproducing issue or an external root cause

Comments

@flippmoke
Copy link

I have run into a problem where mocha hangs forever in garbage collection using 100% cpu rather then ending.

I have narrowed all this down to a simple test case I have created in this repo.

I am using node version v0.10.35.

You can replicate the error by doing:

git clone [email protected]:flippmoke/mochaAssertHang.git
cd mochaAssertHang
npm install
npm test

You will note however, that simply running node ./index.js will not hang and will just output the exception thrown from assert.deepEqual.

I traced back the last working version of this with mocha and it works properly with 2.2.1 but fails with later versions of mocha.

Here is a screen cap of a sample of the process while hung, as you can see it seems to be stuck doing garbage collection.

screen shot 2015-10-06 at 5 58 50 pm

@flippmoke
Copy link
Author

After digging found that it hangs at this line:

var msg = diff.createPatch('string', err.actual, err.expected);

Therefore this seems to be a problem with diff package.

This would also make sense as this commit 789ac58 would have changed the diff version about the right time.

@flippmoke
Copy link
Author

Created an issue on jsdiff and will see if there can be any resolution because the latest version of jsdiff (diff) still does not seem to solve the issue.

@drazisil drazisil added the type: bug a defect, confirmed by a maintainer label Mar 30, 2017
@stale
Copy link

stale bot commented Oct 17, 2017

I am a bot that watches issues for inactivity.
This issue hasn't had any recent activity, and I'm labeling it stale. In 14 days, if there are no further comments or activity, I will close this issue.
Thanks for contributing to Mocha!

@stale stale bot added the stale this has been inactive for a while... label Oct 17, 2017
@boneskull boneskull added the invalid not something we need to work on, such as a non-reproducing issue or an external root cause label Oct 18, 2017
@stale stale bot removed the stale this has been inactive for a while... label Oct 18, 2017
@boneskull boneskull removed the type: bug a defect, confirmed by a maintainer label Oct 18, 2017
@mojavelinux
Copy link

This could be the same problem as described in this issue: chaijs/chai#1109. I've provided a workaround (at least for chai).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid not something we need to work on, such as a non-reproducing issue or an external root cause
Projects
None yet
Development

No branches or pull requests

4 participants