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 the G1 Humongous Allocation BUG, when the connection run all the … #465

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

crazylulululu
Copy link
Contributor

the logic is incorrect ,if a connection is used continuously , it will generate the G1 Humongous Allocation , and GC will be particularly frequent, please fix this bug as soon as possible.
image

…time , will generate many G1 Humongous Allocation , and OOM
@crazylulululu
Copy link
Contributor Author

image

@ok2c
Copy link
Member

ok2c commented Apr 29, 2024

@crazylulululu Do you think you could add a test case for this defect to TestHPackCoding?

@crazylulululu
Copy link
Contributor Author

@crazylulululu Do you think you could add a test case for this defect to TestHPackCoding?

OK, use this.tmpBuf.position() + extra as the requiredCapacity is error , this will occur large size object frequently ,and cause GC

@ok2c
Copy link
Member

ok2c commented Apr 29, 2024

@crazylulululu Do you think you could add a test case for this defect to TestHPackCoding?

OK, use this.tmpBuf.position() + extra as the requiredCapacity is error , this will occur large size object frequently ,and cause GC

@crazylulululu Would you be willing to add a test case to the proposed patch or not?

…n run all the time , will generate many G1 Humongous Allocation , and OOM
@crazylulululu
Copy link
Contributor Author

@ok2c , I have add the test case ,please help to check , thanks.

Copy link
Member

@ok2c ok2c left a comment

Choose a reason for hiding this comment

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

@crazylulululu Awesome. The test case look good.

@@ -158,6 +158,10 @@ void decodeString(final ByteArrayBuffer buffer, final ByteBuffer src) throws HPa
}
}

public int getTmpBufSize() {
Copy link
Member

Choose a reason for hiding this comment

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

@crazylulululu This method does not need to be public. Could you please make package private?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ok2c , I have changed ,thanks

@ok2c ok2c merged commit 6d568cc into apache:master Apr 29, 2024
10 checks passed
ok2c pushed a commit that referenced this pull request Apr 29, 2024
@ok2c
Copy link
Member

ok2c commented Apr 29, 2024

@crazylulululu Merged to 5.2.x as well.

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.

2 participants