Skip to content

Stress-testing caused to stuck on OS X #8432

Closed
@josser

Description

@josser
  • Version: v6.5.0
  • Platform: Darwin josser-mbp 15.6.0 Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64
  • Subsystem: http

Trying to do some stress-tests using ab (yes, I know it's a bit primitive idea) but it looks like there is some issue in OSX-specific code.

So, here is example code:

const cluster = require('cluster');
const os = require('os');
const http = require('http');

if (cluster.isMaster) {
  const cpuCount = os.cpus().length;

  for (let i = 0; i < cpuCount; i++) {
    cluster.fork();
  }
} else {  
  var server = http.createServer( (req, res) => {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('okay');
  });

  server.listen(3000);
}
 ab -n 10000 -c 8 http://localhost:3000/
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
apr_pollset_poll: The timeout specified has expired (70007)
Total of 6386 requests completed

The most interesting thing is that this is happening not always but usually on second ab run.
So, if you don't get error on first run, just try again as quickly as you can.
Issue is not reproducible on linux.

In console.app I see only one message occurring which correlates with ab in case of error:
Here it is:

07.09.16 17:07:07,000 kernel[0]: ALF: ifnet_get_address_list_family error 12

Maybe this can help for investigation.

Thank you and sorry for my bad english.

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpIssues or PRs related to the http subsystem.macosIssues and PRs related to the macOS platform / OSX.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions