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

pd panic if peer has no leader #6647

Closed
nietingbao opened this issue Jun 20, 2023 · 3 comments
Closed

pd panic if peer has no leader #6647

nietingbao opened this issue Jun 20, 2023 · 3 comments
Labels
type/bug The issue is confirmed as a bug.

Comments

@nietingbao
Copy link

IsLeader: peerID == region.GetLeader().Id,

version: v6.1.0

if TiKV cannot start and some region may lose leader , pd will panic during running. logs below are what we met in our env

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

goroutine 516 [running]:
github.com/tikv/pd/server.(*Handler).packHotRegions(0xc000691d10, 0x1a38d66?, {0x2708d13, 0x4})
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/pd/server/handler.go:1050 +0x37e
github.com/tikv/pd/server.(*Handler).PackHistoryHotReadRegions(0xc00470ee30?)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/pd/server/handler.go:1005 +0x3e
github.com/tikv/pd/server/storage.(*HotRegionStorage).pullHotRegionInfo(0xc0002c7280)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/pd/server/storage/hot_region_storage.go:258 +0x2e
github.com/tikv/pd/server/storage.(*HotRegionStorage).backgroundFlush(0xc0002c7280)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/pd/server/storage/hot_region_storage.go:218 +0x195
created by github.com/tikv/pd/server/storage.NewHotRegionsStorage
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/pd/server/storage/hot_region_storage.go:159 +0x21b

@ti-chi-bot ti-chi-bot bot added the needs-type Indicates an issue requires a type label. label Jun 20, 2023
@nietingbao
Copy link
Author

/type bug

@ti-chi-bot ti-chi-bot bot added type/bug The issue is confirmed as a bug. and removed needs-type Indicates an issue requires a type label. labels Jun 20, 2023
@github-actions github-actions bot added this to Need Triage in Questions and Bug Reports Jun 20, 2023
@rleungx
Copy link
Member

rleungx commented Jun 21, 2023

seem #5330 accidentally fixes this problem.

@nietingbao
Copy link
Author

seem #5330 accidentally fixes this problem.

thanks a lot

Questions and Bug Reports automation moved this from Need Triage to Closed Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
Development

No branches or pull requests

2 participants