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
Memory leak in readable-stream when sending packets #1000
Comments
How long does it take to get this error & what server is it on? Did you dump the raw inbound packets also? This will make it easier to debug |
This happened after about 8-12 hours. The server is 2b2t. I think this might have something to do with the fact that that server sends a login packet after you left the queue to log you in to the main server. My guess is that there is something somewhere not realizing that some destination is unavailable anymore. I was not able to reproduce this issue with local test yet. So it might be my code that is wrong? |
Yes probably if you cannot reproduce with a basic code sample |
I never really found what was causing this but I am 80% sure that it was some weird interaction with an infinity loop I had in my code that was blocking the event loop |
[x] The FAQ doesn't contain a resolution to my issue
Versions
Detailed description of a problem
Writing packets on a nmp server can cause a memory leak the serializer. This is what my heap looks like after running out off memory
The next go on for some time as they represent the queued up data in the Transform that is causing the memory leak.
I am not sure what might be causing this. But I think this is caused by protodef trying to parse invalid packets and failing. I had a similar issue in mineflayer where nmp would completely brick itself when it was trying to send invalid sign update packets. My guess is that something messes up causing the internal logic to break so packets are not parsed correctly and end up clogging up the buffer with garbage data.
Expected behavior
No memory leak
The text was updated successfully, but these errors were encountered: