Skip to content

TestStoreWatch panic #8680

@rleungx

Description

@rleungx

Flaky Test

Which jobs are failing

panic.go:262: test panicked: runtime error: invalid memory address or nil pointer dereference
        goroutine 2485 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.23.2/x64/src/runtime/debug/stack.go:26 +0x67
        github.com/stretchr/testify/suite.failOnPanic(0xc00[294](https://github.com/tikv/pd/actions/runs/11252353019/job/31286267439#step:4:295)dba0, {0x47ddd80, 0x6f6fee0})
        	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/suite/suite.go:89 +0x5b
        github.com/stretchr/testify/suite.Run.func1.1()
        	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/suite/suite.go:188 +0x365
        panic({0x47ddd80?, 0x6f6fee0?})
        	/opt/hostedtoolcache/go/1.23.2/x64/src/runtime/panic.go:785 +0x132
        github.com/tikv/pd/server/cluster.(*RaftCluster).checkStoreVersion(0x0, 0xc0014afbc0)
        	/home/runner/work/pd/pd/server/cluster/cluster.go:1287 +0x1f0
        github.com/tikv/pd/server/cluster.(*RaftCluster).putStoreImpl(0x0, 0xc0014afbc0, 0x0)
        	/home/runner/work/pd/pd/server/cluster/cluster.go:1242 +0xef
        github.com/tikv/pd/server/cluster.(*RaftCluster).PutMetaStore(0x0, 0xc0014afbc0)
        	/home/runner/work/pd/pd/server/cluster/cluster.go:1226 +0x8a
        github.com/tikv/pd/tests/integrations/mcs/scheduling.(*metaTestSuite).TestStoreWatch(0xc0001e8150)
        	/home/runner/work/pd/pd/tests/integrations/mcs/scheduling/meta_test.go:106 +0xbac
        reflect.Value.call({0xc0012a3640?, 0xc0000e5538?, 0x13?}, {0x4b5ceb6, 0x4}, {0xc001249ea8, 0x1, 0x1?})
        	/opt/hostedtoolcache/go/1.23.2/x64/src/reflect/value.go:581 +0xd5d
        reflect.Value.Call({0xc0012a3640?, 0xc0000e5538?, 0x1493760?}, {0xc0025daea8, 0x1, 0x1})
        	/opt/hostedtoolcache/go/1.23.2/x64/src/reflect/value.go:365 +0xb6
        github.com/stretchr/testify/suite.Run.func1(0xc00294dba0)
        	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/suite/suite.go:202 +0x6f2
        testing.tRunner(0xc00294dba0, 0xc0014dc3f0)
        	/opt/hostedtoolcache/go/1.23.2/x64/src/testing/testing.go:1690 +0x227
        created by testing.(*T).Run in goroutine 243
        	/opt/hostedtoolcache/go/1.23.2/x64/src/testing/testing.go:1743 +0x826
panic.go:262: test panicked: runtime error: invalid memory address or nil pointer dereference
        goroutine 2964 [running]:
        runtime/debug.Stack()
        	/opt/hostedtoolcache/go/1.23.2/x64/src/runtime/debug/stack.go:26 +0x67
        github.com/stretchr/testify/suite.failOnPanic(0xc002ade340, {0x47e0e40, 0x6f73ee0})
        	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/suite/suite.go:89 +0x5b
        github.com/stretchr/testify/suite.Run.func1.1()
        	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/suite/suite.go:188 +0x365
        panic({0x47e0e40?, 0x6f73ee0?})
        	/opt/hostedtoolcache/go/1.23.2/x64/src/runtime/panic.go:785 +0x132
        github.com/tikv/pd/server/cluster.(*RaftCluster).RemoveTombStoneRecords(0x0)
        	/home/runner/work/pd/pd/server/cluster/cluster.go:1987 +0x8f
        github.com/tikv/pd/tests/integrations/mcs/scheduling.(*metaTestSuite).TestStoreWatch(0xc000407110)
        	/home/runner/work/pd/pd/tests/integrations/mcs/scheduling/meta_test.go:100 +0x765
        reflect.Value.call({0xc0011f3380?, 0xc00008b5d0?, 0x13?}, {0x4b60216, 0x4}, {0xc002a25ea8, 0x1, 0x1?})
        	/opt/hostedtoolcache/go/1.23.2/x64/src/reflect/value.go:581 +0xd5d
        reflect.Value.Call({0xc0011f3380?, 0xc00008b5d0?, 0x1493760?}, {0xc00165eea8, 0x1, 0x1})
        	/opt/hostedtoolcache/go/1.23.2/x64/src/reflect/value.go:365 +0xb6
        github.com/stretchr/testify/suite.Run.func1(0xc002ade340)
        	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.9.0/suite/suite.go:202 +0x6f2
        testing.tRunner(0xc002ade340, 0xc002aa2510)
        	/opt/hostedtoolcache/go/1.23.2/x64/src/testing/testing.go:1690 +0x227
        created by testing.(*T).Run in goroutine [284](https://github.com/tikv/pd/actions/runs/11252653771/job/31286247167#step:4:285)
        	/opt/hostedtoolcache/go/1.23.2/x64/src/testing/testing.go:1743 +0x826

CI link

https://github.com/tikv/pd/actions/runs/11252353019/job/31286267439?pr=8679
https://github.com/tikv/pd/actions/runs/11252653771/job/31286247167

Reason for failure (if possible)

Anything else

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/ciThe issue is related to CI.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions