Skip to content

TiDB crash for concurrent map writes #50835

Closed
@lilinghai

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

common ch benchmark test

fatal error: concurrent map writes
fatal error: concurrent map writes

goroutine 2562728 [running]:
github.com/pingcap/tidb/pkg/planner/core.loadTableStats({0x64df220, 0xc0a718f400}, 0xc008cbddc0, 0xc011e65b80?)
	/workspace/source/pkg/planner/core/stats.go:1081 +0x167
github.com/pingcap/tidb/pkg/planner/core.(*PhysicalIndexLookUpReader).LoadTableStats(0x0?, {0x64df220?, 0xc0a718f400?})
	/workspace/source/pkg/planner/core/physical_plans.go:563 +0x58
github.com/pingcap/tidb/pkg/executor.(*executorBuilder).buildIndexUsageReporter(0xc01194b880, {0x6435fc0, 0xc01110a700})
	/workspace/source/pkg/executor/builder.go:4029 +0xa2
github.com/pingcap/tidb/pkg/executor.buildNoRangeIndexLookUpReader(0xc01194b880, 0xc01110a700)
	/workspace/source/pkg/executor/builder.go:3827 +0x24f
github.com/pingcap/tidb/pkg/executor.(*dataReaderBuilder).buildIndexLookUpReaderForIndexJoin(0xc007f24060, {0x6467b90, 0xc007f21900}, 0xc01110a700, {0xc02e2e6600, 0x40, 0x40}, {0xc03d17ac08, 0x1, 0x1}, ...)
	/workspace/source/pkg/executor/builder.go:4522 +0x8f
github.com/pingcap/tidb/pkg/executor.(*dataReaderBuilder).buildExecutorForIndexJoinInternal(0xc0080c9180?, {0x6467b90?, 0xc007f21900?}, {0x648a840?, 0xc01110a700?}, {0xc02e2e6600?, 0x0?, 0x0?}, {0xc03d17ac08, 0x1, ...}, ...)
	/workspace/source/pkg/executor/builder.go:4132 +0x1fb
github.com/pingcap/tidb/pkg/executor.(*dataReaderBuilder).buildExecutorForIndexJoin(...)
	/workspace/source/pkg/executor/builder.go:4121
github.com/pingcap/tidb/pkg/executor.(*innerWorker).fetchInnerResults(0xc00b840a80, {0x6467b90, 0xc007f21900}, 0xc010c1d900, {0xc02e2e6600?, 0x40?, 0x40?})
	/workspace/source/pkg/executor/index_lookup_join.go:702 +0x205
github.com/pingcap/tidb/pkg/executor.(*innerWorker).handleTask(0xc00b840a80, {0x6467b90, 0xc007f21900}, 0x0?)
	/workspace/source/pkg/executor/index_lookup_join.go:539 +0x199
github.com/pingcap/tidb/pkg/executor.(*innerWorker).run(0xc00b840a80, {0x6467b90, 0xc007f21900}, 0xc03abd4490)
	/workspace/source/pkg/executor/index_lookup_join.go:513 +0x145
created by github.com/pingcap/tidb/pkg/executor.(*IndexLookUpJoin).startWorkers in goroutine 1355976
	/workspace/source/pkg/executor/index_lookup_join.go:195 +0x1cf

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

Release Version: v8.0.0-alpha-155-g27fbccb
Edition: Community
Git Commit Hash: 27fbccb
Git Branch: HEAD
UTC Build Time: 2024-01-30 13:07:34
GoVersion: go1.21.4
Race Enabled: false
Check Table Before Drop: false
Store: unistore

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions