-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.impact/panicseverity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Start a tidb cluster, the following query:
mysql> select * from TIKV_REGION_STATUS where table_id = 81920;
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference
2. What did you expect to see? (Required)
no error
3. What did you see instead (Required)
mysql> select * from TIKV_REGION_STATUS where table_id = 81920;
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference
Here is the error stack:
[2024/11/20 11:32:02.391 +08:00] [INFO] [conn.go:1184] ["command dispatched failed"] [conn=1524629508] [session_alias=] [connInfo="id:1524629508, addr:127.0.0.1:38948 status:10, collation:utf8mb4_0900_ai_ci, user:root"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="select * from TIKV_REGION_STATUS where table_id = 81920"] [txn_mode=PESSIMISTIC] [timestamp=0] [err="runtime error: invalid memory address or nil pointer dereference
github.com/pingcap/errors.AddStack
/home/genius/go/pkg/mod/github.com/pingcap/[email protected]/errors.go:178
github.com/pingcap/errors.Trace
/home/genius/go/pkg/mod/github.com/pingcap/[email protected]/juju_adaptor.go:15
github.com/pingcap/tidb/pkg/util.GetRecoverError
/home/genius/project/src/github.com/pingcap/tidb/pkg/util/util.go:288
github.com/pingcap/tidb/pkg/executor/internal/exec.Next.func1
/home/genius/project/src/github.com/pingcap/tidb/pkg/executor/internal/exec/executor.go:440
runtime.gopanic
/home/genius/project/go/src/runtime/panic.go:785
runtime.panicmem
/home/genius/project/go/src/runtime/panic.go:262
runtime.sigpanic
/home/genius/project/go/src/runtime/signal_unix.go:900
github.com/pingcap/tidb/pkg/store/helper.(*Helper).GetRegionsTableInfo
/home/genius/project/src/github.com/pingcap/tidb/pkg/store/helper/helper.go:684
github.com/pingcap/tidb/pkg/executor.(*memtableRetriever).setDataForTiKVRegionStatus
/home/genius/project/src/github.com/pingcap/tidb/pkg/executor/infoschema_reader.go:1975
github.com/pingcap/tidb/pkg/executor.(*memtableRetriever).retrieve
/home/genius/project/src/github.com/pingcap/tidb/pkg/executor/infoschema_reader.go:164
github.com/pingcap/tidb/pkg/executor.(*MemTableReaderExec).Next
/home/genius/project/src/github.com/pingcap/tidb/pkg/executor/memtable_reader.go:120
github.com/pingcap/tidb/pkg/executor/internal/exec.Next
/home/genius/project/src/github.com/pingcap/tidb/pkg/executor/internal/exec/executor.go:456
github.com/pingcap/tidb/pkg/executor.(*ExecStmt).next
/home/genius/project/src/github.com/pingcap/tidb/pkg/executor/adapter.go:1266
github.com/pingcap/tidb/pkg/executor.(*recordSet).Next
/home/genius/project/src/github.com/pingcap/tidb/pkg/executor/adapter.go:172
github.com/pingcap/tidb/pkg/server/internal/resultset.(*tidbResultSet).Next
/home/genius/project/src/github.com/pingcap/tidb/pkg/server/internal/resultset/resultset.go:72
github.com/pingcap/tidb/pkg/server.(*clientConn).writeChunks
/home/genius/project/src/github.com/pingcap/tidb/pkg/server/conn.go:2319
github.com/pingcap/tidb/pkg/server.(*clientConn).writeResultSet
/home/genius/project/src/github.com/pingcap/tidb/pkg/server/conn.go:2262
github.com/pingcap/tidb/pkg/server.(*clientConn).handleStmt
/home/genius/project/src/github.com/pingcap/tidb/pkg/server/conn.go:2065
github.com/pingcap/tidb/pkg/server.(*clientConn).handleQuery
/home/genius/project/src/github.com/pingcap/tidb/pkg/server/conn.go:1779
github.com/pingcap/tidb/pkg/server.(*clientConn).dispatch
/home/genius/project/src/github.com/pingcap/tidb/pkg/server/conn.go:1378
github.com/pingcap/tidb/pkg/server.(*clientConn).Run
/home/genius/project/src/github.com/pingcap/tidb/pkg/server/conn.go:1147
github.com/pingcap/tidb/pkg/server.(*Server).onConn
/home/genius/project/src/github.com/pingcap/tidb/pkg/server/server.go:741
runtime.goexit
/home/genius/project/go/src/runtime/asm_amd64.s:
1700"]
4. What is your TiDB version? (Required)
Metadata
Metadata
Assignees
Labels
affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.impact/panicseverity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.