Skip to content

TypeError: Cannot read property 'remove' of undefined at close (cluster.js:497:15) #3843

Closed

Description

@nullivex

I am seeing these blowups on Travis.

I will add some portions of the build log.

Setting environment variables from .travis.yml
$ export TRAVIS=travis
$ export CXX=g++-4.8
6.56s$ nvm install 5.0
######################################################################## 100.0%
Checksums empty
Now using node v5.0.0
$ node --version
v5.0.0
$ npm --version
3.3.6
$ nvm --version
0.23.3

During the testing I am seeing the following.

Beginning prism shutdown
Beginning store shutdown
Beginning store shutdown
cluster.js:497
    if (handle.remove(worker)) delete handles[key];
              ^
TypeError: Cannot read property 'remove' of undefined
    at close (cluster.js:497:15)
    at Worker.onmessage (cluster.js:431:7)
    at ChildProcess.<anonymous> (cluster.js:713:8)
    at emitTwo (events.js:92:20)
    at ChildProcess.emit (events.js:172:7)
    at handleMessage (internal/child_process.js:686:10)
    at Pipe.channel.onread (internal/child_process.js:440:11)
  1) "before all" hook for "should still download content"

And another

cluster.js:497
    if (handle.remove(worker)) delete handles[key];
              ^
TypeError: Cannot read property 'remove' of undefined
    at close (cluster.js:497:15)
    at Worker.onmessage (cluster.js:431:7)
    at ChildProcess.<anonymous> (cluster.js:713:8)
    at emitTwo (events.js:92:20)
    at ChildProcess.emit (events.js:172:7)
    at handleMessage (internal/child_process.js:686:10)
    at Pipe.channel.onread (internal/child_process.js:440:11)
  2) "after all" hook for "should still download content"

I am not sure what the internals are of what are causing this. However, I can note that on my Windows machines with Node 5.0 I am not getting these errors.

These crashes are happening randomly for me. If I restart my tests they happen in a different place each time.

It only happens during cluster shutdown.

I am doing a build on multiple node versions to see if I can figure out where this is spawning from.

Activity

  1. nullivex commented on Nov 16, 2015

    @nullivex
    Author

    Okay, I will try to add some environmental states here.

    I am using the cluster module through a module called https://www.npmjs.com/package/infant which I have been using since Node 0.10 without issue.

    I am unsure if there is something in the cluster handling causing this error. I googled for it and couldn't find anyone else seeing this blow up.

    I dont see these errors in the unit tests for infant so I curious about what exactly is causing these strange errors.

  2. added
    clusterIssues and PRs related to the cluster subsystem.
    on Nov 16, 2015
  3. nullivex commented on Nov 16, 2015

    @nullivex
    Author

    Okay nevermind.

    I found the fix against this error here: 33827e3

    I guess it just hasnt been released yet.

  4. nullivex commented on Nov 16, 2015

    @nullivex
    Author

    Any idea when this fix will be released?

  5. yosuke-furukawa commented on Nov 16, 2015

    @yosuke-furukawa
    Member

    You would be better to wait for release v5.1.0.
    #3736

    According to the PR, we will release the version soon.

  6. Fishrock123 commented on Nov 16, 2015

    @Fishrock123
    Contributor

    v5.1.0 will release this week, probably tomorrow. It has been delayed due to some jenkins issues: #3709

    Closing this since the fix itself has already landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clusterIssues and PRs related to the cluster subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions