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

panic in the auto analyze with partition table #51187

Closed
hawkingrei opened this issue Feb 20, 2024 · 0 comments · Fixed by #51195
Closed

panic in the auto analyze with partition table #51187

hawkingrei opened this issue Feb 20, 2024 · 0 comments · Fixed by #51195
Labels
fuzz/randomtest severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@hawkingrei
Copy link
Member

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 panic

3. What did you see instead (Required)

[2024/02/20 14:56:48.560 +08:00] [ERROR] [autoanalyze.go:308] ["HandleAutoAnalyze panicked"] [category=stats] [recover="runtime error: invalid memory address or nil pointer dereference"] [stack="[github.com/pingcap/tidb/pkg/statistics/handle/autoanalyze.HandleAutoAnalyze.func1\n\t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:311\nruntime.gopanic\n\t/Users/bba/.gvm/gos/go1.21.0/src/runtime/panic.go:914\nruntime.panicmem\n\t/Users/bba/.gvm/gos/go1.21.0/src/runtime/panic.go:261\nruntime.sigpanic\n\t/Users/bba/.gvm/gos/go1.21.0/src/runtime/signal_unix.go:861\ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/autoanalyze.tryAutoAnalyzePartitionTableInDynamicMode\n\t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:677\ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/autoanalyze.RandomPickOneTableAndTryAutoAnalyze\n\t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:433\ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/autoanalyze.HandleAutoAnalyze\n\t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:335\ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/autoanalyze.(*statsAnalyze).HandleAutoAnalyze.func1\n\t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:240\ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/util.CallWithSCtx\n\t/Users/bba/pc/tidb/pkg/statistics/handle/util/util.go:103\ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/autoanalyze.(*statsAnalyze).HandleAutoAnalyze\n\t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:239\ngithub.jparrowsec.cn/pingcap/tidb/pkg/domain.(*Domain).autoAnalyzeWorker\n\t/Users/bba/pc/tidb/pkg/domain/domain.go:2475\ngithub.jparrowsec.cn/pingcap/tidb/pkg/domain.(*Domain).UpdateTableStatsLoop.func4\n\t/Users/bba/pc/tidb/pkg/domain/domain.go:2272\ngithub.jparrowsec.cn/pingcap/tidb/pkg/util.(*WaitGroupEnhancedWrapper).Run.func1\n\t/Users/bba/pc/tidb/pkg/util/wait_group_wrapper.go:99](http://github.com/pingcap/tidb/pkg/statistics/handle/autoanalyze.HandleAutoAnalyze.func1/n/t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:311/nruntime.gopanic/n/t/Users/bba/.gvm/gos/go1.21.0/src/runtime/panic.go:914/nruntime.panicmem/n/t/Users/bba/.gvm/gos/go1.21.0/src/runtime/panic.go:261/nruntime.sigpanic/n/t/Users/bba/.gvm/gos/go1.21.0/src/runtime/signal_unix.go:861/ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/autoanalyze.tryAutoAnalyzePartitionTableInDynamicMode/n/t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:677/ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/autoanalyze.RandomPickOneTableAndTryAutoAnalyze/n/t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:433/ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/autoanalyze.HandleAutoAnalyze/n/t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:335/ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/autoanalyze.(*statsAnalyze).HandleAutoAnalyze.func1/n/t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:240/ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/util.CallWithSCtx/n/t/Users/bba/pc/tidb/pkg/statistics/handle/util/util.go:103/ngithub.jparrowsec.cn/pingcap/tidb/pkg/statistics/handle/autoanalyze.(*statsAnalyze).HandleAutoAnalyze/n/t/Users/bba/pc/tidb/pkg/statistics/handle/autoanalyze/autoanalyze.go:239/ngithub.jparrowsec.cn/pingcap/tidb/pkg/domain.(*Domain).autoAnalyzeWorker/n/t/Users/bba/pc/tidb/pkg/domain/domain.go:2475/ngithub.jparrowsec.cn/pingcap/tidb/pkg/domain.(*Domain).UpdateTableStatsLoop.func4/n/t/Users/bba/pc/tidb/pkg/domain/domain.go:2272/ngithub.jparrowsec.cn/pingcap/tidb/pkg/util.(*WaitGroupEnhancedWrapper).Run.func1/n/t/Users/bba/pc/tidb/pkg/util/wait_group_wrapper.go:99)"]

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label Feb 20, 2024
ti-chi-bot bot pushed a commit that referenced this issue Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fuzz/randomtest 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.

2 participants