Skip to content

Panic: concurrent map writes of ParallelNestedLoopApplyExec's SimpleLRUCache #50347

@yibin87

Description

@yibin87

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

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

3. What did you see instead (Required)

From customer case, not sure how to reproduce it, just the panic stack
fatal error: concurrent map writes

goroutine 349945042302 [running]:
github.com/pingcap/tidb/util/kvcache.(*SimpleLRUCache).Put(0xc6eb5946c0, {0x5d72e00, 0xc82454dab8}, {0x52a62a0?, 0xc1d757f730})
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/kvcache/simple_lru.go:114 +0x396
github.com/pingcap/tidb/executor.(*applyCache).put(0xcabeb98aa0, {0xc1c8be0060?, 0xb12eb0f14f0b7?, 0x8a12c80?}, {0x52a62a0, 0xc1d757f730})
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/apply_cache.go:66 +0xe5
github.com/pingcap/tidb/executor.(*applyCache).Set(0xcabeb98aa0, {0xc1c8be0060, 0x2e, 0x2e}, 0xc1d757f730)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/apply_cache.go:93 +0x132
github.com/pingcap/tidb/executor.(*ParallelNestedLoopApplyExec).fetchAllInners(0xc617193d40, {0x5d98390, 0xc60643b440}, 0x9)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/parallel_apply.go:338 +0xa8f
github.com/pingcap/tidb/executor.(*ParallelNestedLoopApplyExec).fillInnerChunk(0xc617193d40, {0x5d98390, 0xc60643b440}, 0x9, 0xc3bde2ebe0)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/parallel_apply.go:384 +0x32f
github.com/pingcap/tidb/executor.(*ParallelNestedLoopApplyExec).innerWorker(0xc617193d40, {0x5d98390, 0xc60643b440}, 0xc713dd9e60?)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/parallel_apply.go:247 +0x1ba
created by github.com/pingcap/tidb/executor.(*ParallelNestedLoopApplyExec).Next
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/executor/parallel_apply.go:146 +0x328
tidb_stderr.log

4. What is your TiDB version? (Required)

v7.1.1

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.found/gsfound by gsreport/customerCustomers have encountered this bug.severity/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