Skip to content

query stuck when trying to kill it because of OOM #55042

@guo-shaoge

Description

@guo-shaoge

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. hack tidb code, delete following code, so we can set tidb_mem_quota_query a very small value to help reproduce this bug
    if intVal > 0 && intVal < 128 { // 128 Bytes
    s.StmtCtx.AppendWarning(ErrTruncatedWrongValue.FastGenByArgs(TiDBServerMemoryLimitSessMinSize, originalValue))
    intVal = 128
    }
  2. build tidb and start tiup playround
  3. download 10-tidb-slow.log and set @@tidb_slow_query_file = '/home/guojiangtao/10-tidb-slow.log'; (remember to change the slow query file path)
  4. set @@tidb_mem_quota_query = 10;
  5. run 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

Metadata

Metadata

Assignees

Labels

affects-5.4This bug affects the 5.4.x(LTS) versions.affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.impact/oomseverity/majorsig/executionSIG executiontype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions