Skip to content

Nil pointer deference when (*AllocatorManager).GetMember #6381

@JmPotato

Description

@JmPotato
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x30cd89b]

goroutine 169455 [running]:
github.com/tikv/pd/pkg/tso.(*AllocatorManager).GetMember(...)
	/home/runner/work/pd/pd/pkg/tso/allocator_manager.go:299
github.com/tikv/pd/pkg/tso.(*KeyspaceGroupManager).GetElectionMember(0xc006482000, 0x10089d7?, 0x0?)
	/home/runner/work/pd/pd/pkg/tso/keyspace_group_manager.go:742 +0x15b
github.com/tikv/pd/pkg/mcs/tso/server.(*Server).IsKeyspaceServing(0xc008ae97a0, 0x7a11d70?, 0xc0?)
	/home/runner/work/pd/pd/pkg/mcs/tso/server/server.go:216 +0xf2
github.com/tikv/pd/tests/integrations/mcs.(*TestTSOCluster).WaitForPrimaryServing.func1()
	/home/runner/work/pd/pd/tests/integrations/mcs/cluster.go:114 +0x10f
github.com/stretchr/testify/assert.Eventually.func1()
	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.2/assert/assertions.go:1737 +0x3a
created by github.com/stretchr/testify/assert.Eventually
	/home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.2/assert/assertions.go:1737 +0x3a6
FAIL	github.com/tikv/pd/tests/integrations/tso	56.267s

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions