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

sentinel-apache-dubbo-adapter Entry leak cause full GC #1416

Closed
ecyuan opened this issue Apr 20, 2020 · 2 comments · Fixed by #1431
Closed

sentinel-apache-dubbo-adapter Entry leak cause full GC #1416

ecyuan opened this issue Apr 20, 2020 · 2 comments · Fixed by #1431
Assignees
Labels
area/integrations Issues or PRs related to integrations with open-source components good first issue Good for newcomers kind/bug Category issues or prs related to bug.
Milestone

Comments

@ecyuan
Copy link

ecyuan commented Apr 20, 2020

sentinel-apache-dubbo-adapter-1.7 cause full gc.

When dubbo request grow, full gc regularly.

Reason:
https://github.com/alibaba/Sentinel/blob/release-1.7/sentinel-adapter/sentinel-apache-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/SentinelDubboConsumerFilter.java#L68

https://github.com/alibaba/Sentinel/blob/release-1.7/sentinel-adapter/sentinel-apache-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/SentinelDubboProviderFilter.java#L70

Provider and Consumer use the same key to store CtEntry.
A = client
B = server dubbo provider
C = server dubbo provider
For example: A --> call B (call C)

When onResponse
https://github.com/alibaba/Sentinel/blob/release-1.7/sentinel-adapter/sentinel-apache-dubbo-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/dubbo/BaseSentinelDubboFilter.java#L65

C remove DubboUtils.DUBBO_INTERFACE_ENTRY_KEY first, then B can't find the key, so CtEntry object create by SentinelDubboProviderFilter escape. so heap will grow.

@sczyh30 sczyh30 added area/integrations Issues or PRs related to integrations with open-source components good first issue Good for newcomers kind/bug Category issues or prs related to bug. labels Apr 20, 2020
@sczyh30
Copy link
Member

sczyh30 commented Apr 20, 2020

Thanks for reporting! It's indeed a bug. Would you like to contribute a PR to fix it? You may refer to the contribution guidelines.

@sczyh30 sczyh30 changed the title sentinel-apache-dubbo-adapter cause full gc sentinel-apache-dubbo-adapter Entry leak cause full GC Apr 20, 2020
@linlinisme linlinisme self-assigned this Apr 20, 2020
@linlinisme
Copy link
Collaborator

linlinisme commented Apr 20, 2020

Assign to me, I know this guy @sczyh30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/integrations Issues or PRs related to integrations with open-source components good first issue Good for newcomers kind/bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants