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

fix node crash on stream, node internals #587

Merged
merged 2 commits into from
Aug 2, 2024
Merged

Conversation

paulo-ocean
Copy link
Contributor

@paulo-ocean paulo-ocean commented Aug 1, 2024

Fixes node crash on stream handling

Changes proposed in this PR:

example from logs:
{"component":"CORE","date":"Thu Aug 01 2024 19:00:05 GMT+0100 (Western European Summer Time)","error":{"code":"ECONNRESET","errno":-104,"syscall":"write"},"exception":true,"level":"error","message":"uncaughtException: write ECONNRESET\nError: write ECONNRESET\n at afterWriteDispatched (node:internal/stream_base_commons:161:15)\n at writeGeneric (node:internal/stream_base_commons:152:3)\n at Socket._writeGeneric (node:net:954:11)\n at Socket._write (node:net:966:8)\n at writeOrBuffer (node:internal/streams/writable:570:12)\n at _write (node:internal/streams/writable:499:10)\n at Writable.write (node:internal/streams/writable:508:10)\n at file:///home/paulo/workspace/OCEAN/ocean-node/node_modules/stream-to-it/dist/src/sink.js:77:31\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.sink (file:///home/paulo/workspace/OCEAN/ocean-node/node_modules/@libp2p/tcp/dist/src/socket-to-conn.js:72:17)","os":{"loadavg":[2.57,2.24,2.06],"uptime":13275.57},"process":{"argv":["/home/paulo/.nvm/versions/node/v20.16.0/bin/node","/home/paulo/workspace/OCEAN/ocean-node/dist/index.js"],"cwd":"/home/paulo/workspace/OCEAN/ocean-node","execPath":"/home/paulo/.nvm/versions/node/v20.16.0/bin/node","gid":1000,"memoryUsage":{"arrayBuffers":578968,"external":5188011,"heapTotal":145915904,"heapUsed":113490792,"rss":223506432},"pid":906712,"uid":1000,"version":"v20.16.0"},"stack":"Error: write ECONNRESET\n at afterWriteDispatched (node:internal/stream_base_commons:161:15)\n at writeGeneric (node:internal/stream_base_commons:152:3)\n at Socket._writeGeneric (node:net:954:11)\n at Socket._write (node:net:966:8)\n at writeOrBuffer (node:internal/streams/writable:570:12)\n at _write (node:internal/streams/writable:499:10)\n at Writable.write (node:internal/streams/writable:508:10)\n at file:///home/paulo/workspace/OCEAN/ocean-node/node_modules/stream-to-it/dist/src/sink.js:77:31\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.sink (file:///home/paulo/workspace/OCEAN/ocean-node/node_modules/@libp2p/tcp/dist/src/socket-to-conn.js:72:17)","trace":[{"column":15,"file":"node:internal/stream_base_commons","function":"afterWriteDispatched","line":161,"method":null,"native":false},{"column":3,"file":"node:internal/stream_base_commons","function":"writeGeneric","line":152,"method":null,"native":false},{"column":11,"file":"node:net","function":"Socket._writeGeneric","line":954,"method":"_writeGeneric","native":false},{"column":8,"file":"node:net","function":"Socket._write","line":966,"method":"_write","native":false},{"column":12,"file":"node:internal/streams/writable","function":"writeOrBuffer","line":570,"method":null,"native":false},{"column":10,"file":"node:internal/streams/writable","function":"_write","line":499,"method":null,"native":false},{"column":10,"file":"node:internal/streams/writable","function":"Writable.write","line":508,"method":"write","native":false},{"column":31,"file":"file:///home/paulo/workspace/OCEAN/ocean-node/node_modules/stream-to-it/dist/src/sink.js","function":null,"line":77,"method":null,"native":false},{"column":5,"file":"node:internal/process/task_queues","function":"process.processTicksAndRejections","line":95,"method":"processTicksAndRejections","native":false},{"column":17,"file":"file:///home/paulo/workspace/OCEAN/ocean-node/node_modules/@libp2p/tcp/dist/src/socket-to-conn.js","function":"async Object.sink","line":72,"method":"sink","native":false}]}

@paulo-ocean paulo-ocean marked this pull request as ready for review August 1, 2024 19:18
Copy link
Member

@alexcos20 alexcos20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

@paulo-ocean paulo-ocean merged commit dc415f6 into develop Aug 2, 2024
8 checks passed
@paulo-ocean paulo-ocean deleted the fix-node-crash-pipe branch August 2, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants