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

http request with a keep-alive agent leads to an assertion failed error #13545

Closed
unbornchikken opened this issue Jun 8, 2017 · 3 comments
Closed
Labels
async_hooks Issues and PRs related to the async hooks subsystem. duplicate Issues and PRs that are duplicates of other issues or PRs. http Issues or PRs related to the http subsystem.

Comments

@unbornchikken
Copy link

unbornchikken commented Jun 8, 2017

  • Version: 8.0.0
  • Platform: Windows 10
  • Subsystem: http

I have an express application that uses http-proxy module. The proxy gets initialized with a custom http agent:

new http.Agent({ keepAlive: true })

http-proxy opens downstream with the standard http module, eg.:

var http   = require('http'),
    https  = require('https');

// ... stuff

var proxyReq = (options.target.protocol === 'https:' ? https : http).request(options));
// where options is { agent: new http.Agent({ keepAlive: true }) } 

See: https://github.com/nodejitsu/node-http-proxy/blob/master/lib/http-proxy/passes/web-incoming.js#L119

So there isn't any black magic, just standard node http with keep-alive configured. I worked with previous node versions but with 8.0.0 I get:

node.exe: c:\ws\src\env-inl.h:131: Assertion `(trigger_id) >= (0)' failed.

Error and of course node crashes.

https://github.com/nodejs/node/blob/master/src/env-inl.h#L131

Since those variables has recently been changed to double, maybe there is an overflow when keep alive gets enabled, that's why we get a failed positive check there.

@addaleax addaleax added async_hooks Issues and PRs related to the async hooks subsystem. duplicate Issues and PRs that are duplicates of other issues or PRs. http Issues or PRs related to the http subsystem. labels Jun 8, 2017
@addaleax
Copy link
Member

addaleax commented Jun 8, 2017

Hi, thanks for reporting this issue!

This has been fixed by #13348 (which is going out with the 8.1.0 release today) / is very very likely a duplicate of #13325, so I’ll be closing this, but feel free to ask any follow-up questions you may have.

@addaleax addaleax closed this as completed Jun 8, 2017
@addaleax
Copy link
Member

addaleax commented Jun 8, 2017

@unbornchikken Actually, 8.1.0 was just released; feel free to try and verify that this is fixed now.

@unbornchikken
Copy link
Author

Fixed, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
async_hooks Issues and PRs related to the async hooks subsystem. duplicate Issues and PRs that are duplicates of other issues or PRs. http Issues or PRs related to the http subsystem.
Projects
None yet
Development

No branches or pull requests

2 participants