Skip to content

bluebird 2.9.14 hangs #534

@ben-page

Description

@ben-page

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:

  1. git clone https://github.com/ben-page/bluebird-issue.git
  2. cd bluebird-issue
  3. npm install
  4. node index.js

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions