-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
res.send cause process exit without a catchable exception #2836
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
Comments
I am having this issue as well with node 5.3 and express 4.13.3
Process finished with exit code 139 |
Hi you guys. Unfortunately trying that code snippet does not cause the app to exit for me. In order for us to take a look, please provide the following information:
Without us being able to reproduce the issue or you providing a stack trace of an error, we would have to wait for you to provide a pull request to fix the issue, if there is an issue in express. |
I did some more digging and oddly, it only seems to do it for me when I run with --debug node flag. This command does not exit:
While this one will exit after a res.status(500).send('whatever')
Here's my middleware:
And here is a test API that crashes for me:
And here is my terminal output:
I am using express 4.13.3 and node 5.3.0. I'll test with node 5.2.x to see if it does the same thing. |
Ah, a "Segmentation fault: 11". This is a Node.js bug, not an express bug. The way node.js works is that there is no way to cause this, so encountering one means there is something very wrong going on in the node.js core code. Can you open an issue against node.js, link here, and help them with reproducing? |
Looks like it has already been reported: nodejs/node#4382 |
Awesome! Thanks for the help on this. |
No problem! Sounds like it should be addressed in 5.3.1 or 5.4.0, which ever comes first. |
@dougwilson I am using v4.2.3. |
and debug is not enabled for me. |
I have encountered process exit with res.send which will not throw any exception when the res has been terminated by the peer server.
this can be reproduce again and again.
if i comment
res.send
, then the node process won't exit anymore.The text was updated successfully, but these errors were encountered: