-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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: Cannot read property 'Symbol(asyncId)' of null #14368
Comments
/cc @nodejs/async_hooks |
Thanks for the issue report. This appears to be already have been fixed (at least when I try). Can you try the nightly build and confirm? |
Sure, just tried it. Here is the log output (called http://localhost:9001 and then http://localhost:9000):
(node -v = v9.0.0-nightly20170718f406a7ebae) |
Ah, okay. I can reproduce this, thanks :) |
@refack I'm not going to have time to debug/fix this, could you look at it. I think |
Will do |
@refack do you have a PR for this? |
I've included a fix for this in #14387. |
Fixes: #14368 PR-URL: #14387 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
Fixes: #14368 PR-URL: #14387 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
It appears like the addition of async_hooks API into the http module (commit 4a7233c) causes an edge case to occur with 'write after end'. Here is a stack trace:
This is an unhandled exception, thrown all the way up to OutgoingMessage.prototype.write, causing crashes when used with streams in some cases. It appears like
msg.socket[async_id_symbol]
is causing the error due tomsg.socket
being null. I have slimmed down the code into as bare as I could. Here is my code:The second block works as intended (emits the error event). It appears like this bug occurs in all versions after v8.0.0.
The text was updated successfully, but these errors were encountered: