-
Notifications
You must be signed in to change notification settings - Fork 454
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
Cannot call write after a stream was destroyed #374
Comments
Just adding some additional context before it leaves my brain: This error was encountered heavily while there were numerous nodes spinning up and down on a local network (IPFS Camp). I'm assuming the thrashing of the network exposed a bug where we're not properly closing streams and bubbling that up when connections terminate, since the stack trace indicates we are writing to a dead connection/stream. A lot of nodes were leveraging MDNS while this was going on, but there were also plenty of browser and go-ipfs nodes running as well. |
I also got this error today while browsing websites via HTTP Gateway.
Which begs the question: is there a bug in ps. possible duplicate: libp2p/pull-mplex#13 |
It's possible the pipe call isn't properly forwarding errors. Using the streams |
I found a way to reproduce
This happens even if I use Update: error is gone if I pass Update: proposed fix in ipfs/js-ipfs#2227 |
This removes buffer-peek-stream which caused uncaught errors inside of Hapijs and replaces it with much simpler approach to set content-type header in Gateway responses. Closes libp2p/js-libp2p#374 Closes libp2p/pull-mplex#13 License: MIT Signed-off-by: Marcin Rataj <[email protected]>
This is an alternative to #2227 that does not hit datastore twice. The underlying error was caused by multiple PassThrough/pipe calls. Turns out go-ipfs does not compress anything by default, so we can remove PassThrough responsible for streaming of compressed payload and fix the issue while keeping optimization introduced by buffer-peek-stream. Closes libp2p/js-libp2p#374 Closes libp2p/pull-mplex#13 License: MIT Signed-off-by: Marcin Rataj <[email protected]>
This is an alternative to #2227 that does not hit datastore twice. The underlying error was caused by multiple PassThrough/pipe calls. Turns out go-ipfs does not compress anything by default, so we can remove PassThrough responsible for streaming of compressed payload and fix the issue while keeping optimization introduced by buffer-peek-stream. Closes libp2p/js-libp2p#374 Closes libp2p/pull-mplex#13 License: MIT Signed-off-by: Marcin Rataj <[email protected]>
Observed after running a daemon for a while:
The text was updated successfully, but these errors were encountered: