Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

[CRASH] Assertion failed: cb->IsFunction() in async-wrap-inl.h at line 230 #7691

@branneman

Description

@branneman

Exact error

Assertion failed: cb->IsFunction(), file g:\jenkins\workspace\nodejs-msi\d73b0901\src\async-wrap-inl.h, line 230

And that's here: src/async-wrap-inl.h#L230

My system

  • Windows 8 Enterprise, 64bit, winver: Version 6.2 (Build 9200)
  • Node.js v0.11.12
  • 12Gb RAM, 7Gb free at time of running node

My application

  • Running Node.js with --harmony flag
  • Only dependency is recluster, version 0.3.6
  • Constisting of 2 files:
    1. cluster.js: a straightforward recluster configuration
    2. node.js: an example webserver, copy-pasted from nodejs.org, tweaked a tiny bit

To reproduce

File 'cluster.js':

const pkg       = require('./package');
const path      = require('path');
const numCPUs   = require('os').cpus().length;
const recluster = require('recluster');

var app = path.join(__dirname, pkg.main);
var options = {
    workers: numCPUs,
    readyWhen: 'ready'
};
var cluster = recluster(app, options);
cluster.run();

console.log('Cluster started with', numCPUs, 'nodes.');

File 'node.js':

const http = require('http');

const WORKER_ID = parseInt(process.env.WORKER_ID, 10) || 0;

var server = http.createServer(function(req, res) {
    res.end('Hello World from worker ' + WORKER_ID);
}).listen(3000 + WORKER_ID, '127.0.0.1');

server.on('listening', function() {
    // Signal recluster that this node is ready.
    if (process.send) {
        process.send({cmd: 'ready'});
    }
});

Run:

  1. node --harmony cluster
  2. Wait 5 minutes (it never crashes right after starting the cluster)
  3. Request http://localhost:3000/, which will time out
  4. Look at your terminal window, it crashed with the error above:
    Assertion failed: cb->IsFunction(), file g:\jenkins\workspace\nodejs-msi\d73b0901\src\async-wrap-inl.h, line 230

The bad news? It doesn't always crash. I hope you guys can reproduce. If further environment info is needed, or I should run some other tests, let me know.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions