-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
query stuck when trying to kill it because of OOM #55042
Comments
/assign @yibin87 |
Selecting plan from slow_query table without limit restriction is not recommanded behavior. And this is a long existing issue. Down to major. |
/remove severity-critical |
/remove-severity critical |
/severity major |
For version 6.5, 7.5, the query met illegal nil pointer: ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference |
v8.1.0 stuck also |
The plan is Sort <=== Projection <==== MemTableReader tidb/pkg/executor/projection.go Line 289 in a187e9d
Then, it triggers the memory action panic: tidb/pkg/util/memory/action.go Line 173 in a187e9d
After it enters runtime.gopanic, and it invokes the recover function in executor::Next: tidb/pkg/executor/internal/exec/executor.go Line 435 in a187e9d
Finally, it got stuck when invokes runtime mcall(recovery) |
It turned out to be debug only stuck on mac OS, the real stuck happen on the following stack: |
And check the source code, found the unlock may not be invoked: tidb/pkg/util/execdetails/execdetails.go Line 1303 in a187e9d
|
After fix this, the stuck disappeared, still not know what's actually happening when the panic happen. |
/label affects-8.1 |
/label affects-7.5 |
/label affects-7.1 |
/label affects-6.5 |
/label affects-6.1 |
/remove-impact leak |
/label affects-5.4 |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
tidb_mem_quota_query
a very small value to help reproduce this bugtidb/pkg/sessionctx/variable/sysvar.go
Lines 1127 to 1130 in 199bf90
set @@tidb_slow_query_file = '/home/guojiangtao/10-tidb-slow.log';
(remember to change the slow query file path)set @@tidb_mem_quota_query = 10;
select time,host host_ip,Query_time as exec_max_time,parse_time,compile_time,Query as sql_text,Digest as sql_id,is_internal,succ, Plan as plan_text,mem_max as mem_max,User as parse_user,DB as database_name,total_keys,request_count,process_time,process_keys from information_schema.SLOW_QUERY order by time desc;
2. What did you expect to see? (Required)
query is canceled
3. What did you see instead (Required)
query is stucked
4. What is your TiDB version? (Required)
master 560e92e
The text was updated successfully, but these errors were encountered: