#51968·tidb

flaky test TestKillAutoAnalyzeIndex

Author: lance6716Created Mar 21, 2024Updated Sep 30, 2026
Labelstype/enhancementsig/plannercomponent/testaffects-8.5flaky-test

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

    analyze_test.go:1874: 

        	Error Trace:	pkg/executor/test/analyzetest/analyze_test.go:1874

        	            				pkg/executor/test/analyzetest/analyze_test.go:2027

        	            				pkg/executor/test/analyzetest/analyze_test.go:2030

        	Error:      	Not equal: 

        	            	expected: "[executor:1317]Query execution was interrupted"

        	            	actual  : "runtime error: invalid memory address or nil pointer dereference"

        	            	

        	            	Diff:

        	            	--- Expected

        	            	+++ Actual

        	            	@@ -1 +1 @@

        	            	-[executor:1317]Query execution was interrupted

        	            	+runtime error: invalid memory address or nil pointer dereference

        	Test:       	TestKillAutoAnalyzeIndex

        	Messages:   	kill pending analyze job
[2024/03/21 04:27:17.568 +00:00] [ERROR] [exec.go:65] ["auto analyze failed"] [category=stats] [sql="analyze table `test`.`t` index `idx`"] [cost_time=5.920899ms] [error="runtime error: invalid memory address or nil pointer dereference"] [stack="github.com/pingcap/tidb/pkg/statistics/handle/autoanalyze/exec.AutoAnalyze\n\tpkg/statistics/handle/autoanalyze/exec/exec.go:65\ngithub.com/pingcap/tidb/pkg/statistics/handle/autoanalyze/priorityqueue.(*NonPartitionedTableAnalysisJob).analyzeIndexes\n\tpkg/statistics/handle/autoanalyze/priorityqueue/non_partitioned_table_analysis_job.go:184\ngithub.com/pingcap/tidb/pkg/statistics/handle/autoanalyze/priorityqueue.(*NonPartitionedTableAnalysisJob).Analyze.func1\n\tpkg/statistics/handle/autoanalyze/priorityqueue/non_partitioned_table_analysis_job.go:81\ngithub.com/pingcap/tidb/pkg/statistics/handle/util.CallWithSCtx\n\tpkg/statistics/handle/util/util.go:103\ngithub.com/pingcap/tidb/pkg/statistics/handle/autoanalyze/priorityqueue.(*NonPartitionedTableAnalysisJob).Analyze\n\tpkg/statistics/handle/autoanalyze/priorityqueue/non_partitioned_table_analysis_job.go:76\ngithub.com/pingcap/tidb/pkg/statistics/handle/autoanalyze/refresher.(*Refresher).PickOneTableAndAnalyzeByPriority\n\tpkg/statistics/handle/autoanalyze/refresher/refresher.go:105\ngithub.com/pingcap/tidb/pkg/statistics/handle/autoanalyze.HandleAutoAnalyze\n\tpkg/statistics/handle/autoanalyze/autoanalyze.go:284\ngithub.com/pingcap/tidb/pkg/statistics/handle/autoanalyze.(*statsAnalyze).HandleAutoAnalyze.func1\n\tpkg/statistics/handle/autoanalyze/autoanalyze.go:240\ngithub.com/pingcap/tidb/pkg/statistics/handle/util.CallWithSCtx\n\tpkg/statistics/handle/util/util.go:103\ngithub.com/pingcap/tidb/pkg/statistics/handle/autoanalyze.(*statsAnalyze).HandleAutoAnalyze\n\tpkg/statistics/handle/autoanalyze/autoanalyze.go:239\npkg/executor/test/analyzetest/analyzetest_test.TestKillAutoAnalyzeIndex.func2\n\tpkg/executor/test/analyzetest/analyze_test.go:2018\npkg/executor/test/analyzetest/analyzetest_test.TestKillAutoAnalyzeIndex\n\tpkg/executor/test/analyzetest/analyze_test.go:2030\ntesting.tRunner\n\tGOROOT/src/testing/testing.go:1595"]

https://do.pingcap.net/jenkins/blue/organizations/jenkins/pingcap%2Ftidb%2Fghpr_unit_test/detail/ghpr_unit_test/6388/pipeline

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

Automated flaky test report update.

Repo: pingcap/tidb Branch: master Package: pkg/executor/test/analyzetest Case: TestKillAutoAnalyzeIndex Flaky Count: 1 Time Thresholded Count: 0 Latest Build: https://prow.tidb.net/jenkins/job/pingcap/job/tidb/job/merged_unit_test/383/ Window: 2026-06-18T00:00:00.000Z → 2026-06-19T00:00:00.000Z Threshold: 100000 ms