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 netty memory leak #14127

Merged
merged 3 commits into from
May 8, 2024
Merged

Fix netty memory leak #14127

merged 3 commits into from
May 8, 2024

Conversation

finefuture
Copy link
Contributor

What is the purpose of the change

There is a Netty memory leak in the onData and onNext methods in http1. ByteBuf needs to be released after processing the http1 request and encoding failure.

image
image

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@finefuture finefuture force-pushed the 3.3-fix-memory-leak branch from acab727 to abad283 Compare April 24, 2024 08:24
@finefuture finefuture force-pushed the 3.3-fix-memory-leak branch from abad283 to 510d7b3 Compare April 27, 2024 14:09
@finefuture
Copy link
Contributor Author

image
Failure to close the decoder when using the grpc protocol causes netty memory leaks. The decoder should be closed when judging endStream.
image

@finefuture finefuture requested a review from oxsean April 27, 2024 14:27
@oxsean oxsean self-requested a review April 29, 2024 13:26
@AlbumenJ
Copy link
Member

AlbumenJ commented May 8, 2024

@finefuture Please ping me once all the test cases pass

Copy link

sonarqubecloud bot commented May 8, 2024

@AlbumenJ AlbumenJ merged commit 487fa4f into apache:3.3 May 8, 2024
17 of 19 checks passed
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