-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Dist binary memory leak in tcp_inet in Erlang OTP 24 and 25 #7834
Comments
Sure sounds reasonable, |
@nickva Thanks, it was related to the removed pid-ref table! PR #7915 should fix this issue. It has not been very well tested yet, but I'm quite sure it is correct. The PR is based on OTP 24.3.4 and should merge forward cleanly. Unless something unexpected happen it should soon be released in patches. |
That's perfect. Thanks for taking a look and fixing it, Rickard! |
When writing test cases I found that a crash could occur, so I've added a fix for that as well in #7915. The test cases made it impossible to have one branch for all releases, so the branch in #7915 is now based on OTP 26.1.2. There are a |
Thank you for the fixes, Rickard! In order to test them ASAP, I patched
Fortunately, it seems like a simple conflict resolution, and the subsequent Also, it looks like everything builds successfully after the patches are applied, so I think we can move forward with our testing 🎉 |
This issue has been fixed in OTP 26.2, OTP 25.2.3.8, and OTP 24.3.4.15 |
Thank you, Rickard |
Describe the bug
There seems to be a binary memory leak when sending data from a file across a dist channel.
To Reproduce
Reading file IO data across a dist channel when processes time-out and exit early seems to get the memory allocated in the tcp_inet binary drivers. Disconnecting the nodes doesn't seem to release the memory.
This was detected when attempting to reproduce blocking behavior in #7801
The reproducer is in https://gist.github.com/nickva/31232b3ed9f57ce8f96b2e4ecfdec524
It was run on two nodes started on the same server.
Expected behavior
It's expected that the binary memory would not increase and leak without bounds. Some memory usage is expected but it should be released at least on
distblockleak:stop()
and when the nodes disconnect.Affected versions
Latest OTP 24 and 25 versions.
Does not affect OTP 23 and OTP 26.
On OTP 23 the memory usage constant with the above reproducer.
On OTP 26:
Additional context
Since the reproducer in https://gist.github.com/nickva/31232b3ed9f57ce8f96b2e4ecfdec524 was designed to reproduce the blocking issue in #7801, it may have additional/irrelevant parts for this issue.
The text was updated successfully, but these errors were encountered: