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

Memory leaks when new owner is enabled #2212

Closed
overvenus opened this issue Jul 3, 2021 · 2 comments
Closed

Memory leaks when new owner is enabled #2212

overvenus opened this issue Jul 3, 2021 · 2 comments
Labels
area/ticdc Issues or PRs related to TiCDC. difficulty/hard Hard task. severity/major type/bug The issue is confirmed as a bug.

Comments

@overvenus
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.

Capturing 6k tables, go runtime heap profile shows in_use objects leak with an acceleration 100k object/s^2.
Top memory consumers are:

  • github.com/pingcap/ticdc/cdc/puller/sorter.runMerger.func2
    • model.NewResolvedPolymorphicEvent(0, ts) 10.8G
  • github.com/pingcap/ticdc/cdc/processor/pipeline.(*sorterNode).Init.func4
    • pipeline.PolymorphicEventMessage(msg) 2.16G
  • github.com/pingcap/ticdc/cdc/processor/pipeline.(*tablePipelineImpl).UpdateBarrierTs
    • pipeline.BarrierMessage(ts) 1.79G
  • github.com/pingcap/ticdc/pkg/pipeline.NewPipeline.func1
    • TickMessage() 1.65G

image

In_use objects profile: https://gist.github.com/overvenus/af73663f299a71468e6c934dd9cabb8a

  1. What did you expect to see?

No memory leak.

  1. What did you see instead?

Memory leak.

  1. Versions of the cluster

v5.0.3 with new owner.

@overvenus
Copy link
Member Author

From heap profile, it shows that memory leak is caused by GC is slow, allocated objects (pipeline.Message) accumulate in memory.

@overvenus
Copy link
Member Author

Testing TiCDC (together with #2226, #2415 and #2474) that captures 20k tables, no memory leak anymore, we can close the issue.

@AkiraXie AkiraXie added the area/ticdc Issues or PRs related to TiCDC. label Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ticdc Issues or PRs related to TiCDC. difficulty/hard Hard task. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants