tidb fatal error: concurrent map read and map write
in (*RuntimeStatsColl).ExistsRootStats
#39098
Labels
affects-6.4
found/automation
Found by automation tests
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
no error
3. What did you see instead (Required)
fatal error: concurrent map read and map write goroutine 140623 [running]: github.com/pingcap/tidb/util/execdetails.(*RuntimeStatsColl).ExistsRootStats(0x7f89e449f2c0?, 0x0?) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/execdetails/execdetails.go:766 +0xa6 github.com/pingcap/tidb/planner/core.getRuntimeInfo({0x4eb7f68, 0xc012396500}, {0x4e6f580, 0xc094aff900}, 0x7f8a13c92d28?) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:866 +0x7d github.com/pingcap/tidb/planner/core.getRuntimeInfoStr({0x4eb7f68?, 0xc012396500?}, {0x4e6f580?, 0xc094aff900?}, 0xc094aff900?) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:830 +0xa5 github.com/pingcap/tidb/planner/core.(*Explain).prepareOperatorInfo(0xc093a08f28, {0x4e6f580, 0xc094aff900}, {0xc11196e3e7, 0x9}, {0xc17c099360, 0x1a}) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:895 +0x3c9 github.com/pingcap/tidb/planner/core.(*Explain).explainFlatOpInRowFormat(0xc093a08f28, 0xc095cda6c0) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:815 +0x21d github.com/pingcap/tidb/planner/core.(*Explain).explainFlatPlanInRowFormat(0x4e6efe0?, 0xc095cf85a0) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:796 +0x5f github.com/pingcap/tidb/planner/core.(*Explain).RenderResult(0xc093a08f28) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:763 +0xd4e github.com/pingcap/tidb/planner/core.GetExplainAnalyzeRowsForPlan(0xc093a08f28) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/planner/core/common_plans.go:666 +0x2f github.com/pingcap/tidb/session.(*session).getCurrentAnalyzePlan(0xc012396500, {0x46275e0?, 0xc095889200}, 0xc099563098) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:1647 +0xd7 github.com/pingcap/tidb/util/memoryusagealarm.getCurrentAnalyzePlan(0x5507b?) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/memoryusagealarm/memoryusagealarm.go:249 +0x53 github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).getTop10SqlInfo(0xc093a09f20, 0xa80?, {0xc093e77600?, 0x9, 0x36?}) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/memoryusagealarm/memoryusagealarm.go:291 +0x9e6 github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).getTop10SqlInfoByCostTime(0x8?, {0xc093e77600?, 0x36?, 0x294?}) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/memoryusagealarm/memoryusagealarm.go:317 +0x2e github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).printTop10SqlInfo(0xc1591ad1d0?, {0xc093e77600, 0x9, 0xa4}, 0xc012ad9840?) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/memoryusagealarm/memoryusagealarm.go:268 +0x50a github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).recordSQL(0xc14e01d180?, {0x4e700c0?, 0xc0071b1d00?}, {0xc14e01d180, 0x3c}) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/memoryusagealarm/memoryusagealarm.go:342 +0x43a github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).doRecord(0xc093a09f20, 0x1f0acf000?, 0xffffffffffffffff?, {0x4e700c0, 0xc0071b1d00}, 0x1) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/memoryusagealarm/memoryusagealarm.go:228 +0x103e github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).alarm4ExcessiveMemUsage(0xc093a09f20, {0x4e700c0, 0xc0071b1d00}) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/memoryusagealarm/memoryusagealarm.go:165 +0x18d github.com/pingcap/tidb/util/memoryusagealarm.(*Handle).Run(0xc0005ab7e8) /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/memoryusagealarm/memoryusagealarm.go:66 +0x113 created by main.createServer /home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:762 +0x4d0
tidb1-1112-err-1.log
4. What is your TiDB version? (Required)
6.4
The text was updated successfully, but these errors were encountered: