Skip to content

all TiDB instance restart with panic due to analyze race #68457

@Lily2025

Description

@Lily2025

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

1,run sysbench
2,add and drop column repeatedly

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

no panic

3. What did you see instead (Required)

all TiDB instance restart with panic when add and drop column
DDL failed due to all tidb instance restart with panic

Image

tidb logs

tidb.log

The immediate cause is
fatal error: concurrent map read and map write
Tidb_build_sampling_stats_concurrency, GetSessionOrGlobalSystemVar related operations
Concurrent analyze worker race on 'SessionVars.systems'

4. What is your TiDB version? (Required)

[2026/05/17 20:20:33.491 +00:00] [INFO] [printer.go:73] ["Welcome to TiDB."] [keyspaceName=10779081037828048042] ["Release Version"=CLOUD.202604.0-abfc4e1aa8] [Edition=Enterprise] ["Git Commit Hash"=abfc4e1aa83d7be98d3defe7f2aa03e6fe76da55] ["Git Branch"=HEAD] ["UTC Build Time"="2026-04-16 08:29:59"] [GoVersion=go1.25.8] ["Race Enabled"=false] ["Check Table Before Drop"=false] ["TiDB Component Version"=v26.4.0-abfc4e1aa8] ["Kernel Type"="Next Generation"] ["Enterprise Extension Commit Hash"=dc633aae52eb11b4e3549e3a7ef5b0ed14e159b1]

Metadata

Metadata

Assignees

Labels

affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.severity/majortype/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