-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
bluebird 2.9.14 hangs #534
Comments
2.9.14 doesn't do anything but specifically change to using anything but nextTick, so I guess you could use 2.9.13? |
Yes, I can use 2.9.13. |
@petkaantonov loves nextTick in node and how it's implemented :D @ben-page you can use 2.9.14 and |
@benjamingr That's what I'm currently doing. I'm not trying to say that bluebird shouldn't use nextTick, just that I've found an issue with its current usage. I don't understand the bluebird internals well enough to say whether the issue can be fixed in bluebird or if its fundamental to nextTick. |
Description
One of my applications started hanging after upgrading to 2.9.14 (on node v0.12.0). I've narrowed the issue to the change from setImmediate to nextTick.
Example
This is the simplest example I could come up with that reliably demonstrates the problem:
If you run the code as is, it will hang. If you uncomment line 7 (to change the scheduler to setImmediate) or install bluebird 2.9.13, it will complete as expected.
Background
Honestly, I don't fully understand the problem, but I have found found several discussions that may be helpful. Apparently there are issues with race conditions or IO starvation related to nextTick.
nodejs/node-v0.x-archive#7996
http://blog.nodejs.org/2013/03/11/node-v0-10-0-stable/
nodejs/node-v0.x-archive#3335
https://groups.google.com/forum/#!topic/nodejs-dev/DvENgK8Nubw
The text was updated successfully, but these errors were encountered: