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

workerpool.(*mergedContext).Done creates too many goroutines #2211

Closed
overvenus opened this issue Jul 3, 2021 · 1 comment · Fixed by #2201
Closed

workerpool.(*mergedContext).Done creates too many goroutines #2211

overvenus opened this issue Jul 3, 2021 · 1 comment · Fixed by #2201
Labels
area/ticdc Issues or PRs related to TiCDC. 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 trace shows workerpool.(*mergedContext).Done creates 105k goroutines, this is clearly not expected, it should be optimized.

Goroutines:
golang.org/x/sync/errgroup.(*Group).Go.func1 N=81848
runtime.gcBgMarkWorker N=38google.golang.org/grpc/internal/transport.(*http2Client).reader N=27802
github.com/pingcap/ticdc/cdc.(*oldProcessor).addTable.func2.5 N=6672
github.com/pingcap/ticdc/pkg/workerpool.(*mergedContext).Done.func1 N=1056480
github.com/pingcap/ticdc/cdc.(*oldProcessor).addTable.func2.4 N=6672
runtime.bgsweep N=1google.golang.org/grpc/internal/transport.(*http2Client).keepalive N=27798
github.com/pingcap/ticdc/pkg/notify.(*Receiver).signalTickLoop.func1 N=13381
google.golang.org/grpc/internal/transport.newHTTP2Client.func3 N=27802
net/http.(*conn).serve N=2
  1. What did you expect to see?

No 105k goroutines.

  1. What did you see instead?

105k goroutines.

  1. Versions of the cluster

v5.0.3

@overvenus overvenus added the type/bug The issue is confirmed as a bug. label Jul 3, 2021
@amyangfei
Copy link
Contributor

will be fixed by #2201

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. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants