Skip to content

passing socket from master to worker causes a timeout issue where socket is null. #13435

@japrescott

Description

@japrescott

node: 8
npm: 5.0.2
linux Ubuntu 1604 -> 4.8.0-51

Setup:
When using node with the cluster module while using socket.io, connections are passed from the master to the children by emitting. This is needed for "sticky-sessions" to work. This worked with node v7.10.

Since node8, I am getting following error;

worker process 3583 got 'uncaughtException', shutdown gracefully! TypeError: Cannot read property 'emit' of null
    at Socket.socketOnTimeout (_http_server.js:386:34)
    at emitNone (events.js:105:13)
    at Socket.emit (events.js:207:7)
    at Socket._onTimeout (net.js:401:8)
    at ontimeout (timers.js:488:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:283:5) 'TypeError: Cannot read property \'emit\' of null\n    at Socket.socketOnTimeout (_http_server.js:386:34)\n    at emitNone (events.js:105:13)\n    at Socket.emit (events.js:207:7)\n
    at Socket._onTimeout (net.js:401:8)\n    at ontimeout (timers.js:488:11)\n    at tryOnTimeout (timers.js:323:5)\n    at Timer.listOnTimeout (timers.js:283:5)'

This is particularly strange as I have a domain wrapping the worker code which should prevent an uncaughtException.

I have my suspicion, this is related to #13348

Metadata

Metadata

Assignees

No one assigned

    Labels

    clusterIssues and PRs related to the cluster subsystem.confirmed-bugIssues with confirmed bugs.httpIssues or PRs related to the http subsystem.regressionIssues related to regressions.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions