You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How often does it reproduce? Is there a required condition?
This is a synthetic test case that is reproducible consistently.
On the production system which experienced this error - the issue did not reproduce consistently.
Please note, that the server.js implementation is intentionally broken to simulate bad http server. However, even in this case, the client.js should not crash.
A process with NODE_DEBUG=net,stream,http produces the following output before a crash:
11-20 21:49:34 STREAM 46: emitReadable_
11-20 21:49:34 STREAM 46: flow
11-20 21:49:34 STREAM 46: read undefined
11-20 21:49:34 STREAM 46: endReadable
11-20 21:49:34 STREAM 46: read 0
11-20 21:49:34 STREAM 46: endReadable
11-20 21:49:34 STREAM 46: endReadableNT
11-20 21:49:34 STREAM 46: endReadableNTc
11-20 21:49:34 STREAM 46: onWriteComplete -32 undefined
11-20 21:49:34 HTTP 46: AGENT socket keep-alive
11-20 21:49:34 NET 46: destroy
11-20 21:49:34 NET 46: close
11-20 21:49:34 NET 46: close handle
11-20 21:49:34 HTTP 46: CLIENT socket onFree
11-20 21:49:34 HTTP 46: agent.on(free) localhost:80::/var/run/datadog/apm.socket
11-20 21:49:34 [pid=46] Node is now CRASHING with uncaughtException. See the error around. -- This is custom error handler, not `NODE_DEBUG` output.
11-20 21:49:34 Error: write EPIPE
11-20 21:49:34 at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:95:16)
11-20 21:49:34 at WriteWrap.callbackTrampoline (node:internal/async_hooks:130:17)
What is the expected behavior? Why is that the expected behavior?
The node process should not crash with unhandled exception and instead should use error handler
The text was updated successfully, but these errors were encountered:
oleg-slapdash
changed the title
Getting uncaughtException Error: write when sending http requests over unix socket
Getting uncaughtException Error: write EPIPE when sending http requests over unix socket
Nov 21, 2024
Version
v23.3.0
Platform
Subsystem
No response
What steps will reproduce the bug?
Create
server.js
Create
client.js
Run
Observe:
How often does it reproduce? Is there a required condition?
This is a synthetic test case that is reproducible consistently.
On the production system which experienced this error - the issue did not reproduce consistently.
Please note, that the
server.js
implementation is intentionally broken to simulate bad http server. However, even in this case, theclient.js
should not crash.A process with
NODE_DEBUG=net,stream,http
produces the following output before a crash:What is the expected behavior? Why is that the expected behavior?
The node process should not crash with unhandled exception and instead should use error handler
What do you see instead?
An unhandled exception crash.
Additional information
I think it's related to the following comments:
https://github.com/nodejs/node/blob/v20.x/lib/_http_agent.js#L118-L128
https://github.com/nodejs/node/blob/v20.x/lib/_http_client.js#L730-L731
The text was updated successfully, but these errors were encountered: