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

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

Closed
nullivex opened this issue Nov 16, 2015 · 5 comments
Labels
cluster Issues and PRs related to the cluster subsystem.

Comments

@nullivex
Copy link

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.

@nullivex
Copy link
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.

@mscdex mscdex added the cluster Issues and PRs related to the cluster subsystem. label Nov 16, 2015
@nullivex
Copy link
Author

Okay nevermind.

I found the fix against this error here: 33827e3

I guess it just hasnt been released yet.

@nullivex
Copy link
Author

Any idea when this fix will be released?

@yosuke-furukawa
Copy link
Member

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

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

@Fishrock123
Copy link
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
Labels
cluster Issues and PRs related to the cluster subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants