Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TiDB panic: fatal error: concurrent map writes #52223

Closed
fubinzh opened this issue Mar 29, 2024 · 3 comments · Fixed by #52226
Closed

TiDB panic: fatal error: concurrent map writes #52223

fubinzh opened this issue Mar 29, 2024 · 3 comments · Fixed by #52226
Labels
affects-7.5 severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@fubinzh
Copy link

fubinzh commented Mar 29, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

TiDB repeated panic seen

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

no panic

3. What did you see instead (Required)

fatal error: concurrent map writes

goroutine 1521 [running]:
github.com/pingcap/tidb/pkg/statistics.(*ColAndIdxExistenceMap).InsertCol(...)
	/workspace/source/tidb/pkg/statistics/table.go:138
github.com/pingcap/tidb/pkg/statistics/handle.(*Handle).initStatsHistograms4ChunkLite(0xc003c7f000, {0x66566f8, 0xc013826000}, {0x6641460, 0xc000125fb0}, 0xc0166d8780)
	/workspace/source/tidb/pkg/statistics/handle/bootstrap.go:146 +0x36d
github.com/pingcap/tidb/pkg/statistics/handle/initstats.(*Worker).loadStats(0xc01c7fd1a0, {0x66566f8, 0xc013826000}, {0x6641460, 0xc000125fb0}, 0xc0210a42d0)
	/workspace/source/tidb/pkg/statistics/handle/initstats/load_stats.go:73 +0xee
github.com/pingcap/tidb/pkg/statistics/handle/initstats.(*Worker).LoadStats.func1()
	/workspace/source/tidb/pkg/statistics/handle/initstats/load_stats.go:56 +0x6e
github.com/pingcap/tidb/pkg/util.(*WaitGroupWrapper).Run.func1()
	/workspace/source/tidb/pkg/util/wait_group_wrapper.go:157 +0x4f
created by github.com/pingcap/tidb/pkg/util.(*WaitGroupWrapper).Run in goroutine 1184
	/workspace/source/tidb/pkg/util/wait_group_wrapper.go:155 +0x73

tidb.panic.txt

4. What is your TiDB version? (Required)

Release Version: v8.0.0-alpha-663-g8d9e67b
Edition: Community
Git Commit Hash: 8d9e67b
Git Branch: HEAD
UTC Build Time: 2024-03-28 13:24:05
GoVersion: go1.21.4
Race Enabled: false
Check Table Before Drop: false
Store: unistore

@fubinzh fubinzh added the type/bug The issue is confirmed as a bug. label Mar 29, 2024
@fubinzh
Copy link
Author

fubinzh commented Mar 29, 2024

/severity critical

@fubinzh
Copy link
Author

fubinzh commented Mar 29, 2024

It seems that panic happens after TiDB upgrade from 094f4df to 089cba4
image

@hawkingrei
Copy link
Member

It only affects the master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants