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

global memory controller fail to kill delete stmt for a long time #49643

Closed
XuHuaiyu opened this issue Dec 21, 2023 · 3 comments
Closed

global memory controller fail to kill delete stmt for a long time #49643

XuHuaiyu opened this issue Dec 21, 2023 · 3 comments
Labels
affects-6.5 affects-7.1 affects-7.5 report/customer Customers have encountered this bug. severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.

Comments

@XuHuaiyu
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)


|2023-12-20 12:51:52 | [2023/12/20 04:51:52.327 +00:00] [WARN] [servermemorylimit.go:106] ["global memory controller failed to kill the top-consumer in 481s"] [connID=1480195538757528957] ["sql digest"=20c3bbf1d0fb980ae06a8ff432bb7ab93712612b3174973b5e07e21855fd41bb] ["sql text"="delete   from xx.bu where `time`>='2023-12-19 12:00:00' and `time`<='2023-12-19 20:00:00'"] ["sql memory usage"=2550128640]
...
|2023-12-20 12:43:55 | [2023/12/20 04:43:55.926 +00:00] [WARN] [servermemorylimit.go:106] ["global memory controller failed to kill the top-consumer in 5s"] [connID=1480195538757528957] ["sql digest"=20c3bbf1d0fb980ae06a8ff432bb7ab93712612b3174973b5e07e21855fd41bb] ["sql text"="delete   from xx.bu where `time`>='2023-12-19 12:00:00' and `time`<='2023-12-19 20:00:00'"] ["sql memory usage"=2550128640]
|2023-12-20 12:43:50 | [2023/12/20 04:43:50.926 +00:00] [WARN] [servermemorylimit.go:148] ["global memory controller tries to kill the top1 memory consumer"] [connID=1480195538757528957] ["sql digest"=20c3bbf1d0fb980ae06a8ff432bb7ab93712612b3174973b5e07e21855fd41bb] ["sql text"="delete   from xx.bu where `time`>='2023-12-19 12:00:00' and `time`<='2023-12-19 20:00:00'"] [tidb_server_memory_limit=11510510320] ["heap inuse"=12261236736] ["sql memory usage"=2550128640]

heap profile:

截屏2023-12-21 11 11 50

goroutines:
goroutine2023-12-20T04_50_54Z.txt

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

v6.5.3

@XuHuaiyu XuHuaiyu added type/bug The issue is confirmed as a bug. sig/transaction SIG:Transaction labels Dec 21, 2023
@XuHuaiyu
Copy link
Contributor Author

By the way, the memory usage of kv.(*LockCtx).InitCheckExistencemight not be tracked by memory tracker

@ekexium
Copy link
Contributor

ekexium commented Dec 21, 2023

4 problems here:

We can use the issue to track the problem 2 and 3.

ti-chi-bot bot pushed a commit that referenced this issue Jan 8, 2024
AilinKid pushed a commit to AilinKid/tidb that referenced this issue Jan 17, 2024
@ekexium ekexium closed this as completed Feb 21, 2024
@seiya-annie
Copy link

/found customer

@ti-chi-bot ti-chi-bot bot added the report/customer Customers have encountered this bug. label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 affects-7.1 affects-7.5 report/customer Customers have encountered this bug. severity/moderate sig/transaction SIG:Transaction type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

4 participants