Skip to content

kvclient panic when kill pd leader during br backup #54848

@crazycs520

Description

@crazycs520

Bug Report

Related Issue: tikv/client-go#1357

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

1、run br backup
2、kill pd leader
3、br backup failed
`panic: close of closed channel

goroutine 2822 [running]:
github.com/tikv/client-go/v2/internal/client.(*batchConn).Close(...)
/root/go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/client/client_batch.go:769
github.com/tikv/client-go/v2/internal/client.(*connArray).Close(0xc0004bb560)
/root/go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/client/client.go:330 +0xf6
github.com/tikv/client-go/v2/internal/client.(*RPCClient).CloseAddr(0xc0007e3680, {0xc000f7e7d0, 0x44})
/root/go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/client/client.go:797 +0x1e5
github.com/tikv/client-go/v2/internal/client.(*RPCClient).recycleIdleConnArray(0xc0007e3680)
/root/go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/client/client_batch.go:835 +0x1f7
created by github.com/tikv/client-go/v2/internal/client.(*RPCClient).sendRequest in goroutine 2821
/root/go/pkg/mod/github.com/tikv/client-go/[email protected]/internal/client/client.go:587 +0x34b`

tidb version:
./tidb-server -V
Release Version: v7.5.2
Edition: Community
Git Commit Hash: 39ea2b3
Git Branch: HEAD
UTC Build Time: 2024-05-29 15:07:12
GoVersion: go1.21.10
Race Enabled: false
Check Table Before Drop: false
Store: unistore
2024-05-30T14:14:32.686+0800

Metadata

Metadata

Assignees

Labels

affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.impact/panicseverity/majorsig/transactionSIG:Transactiontype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions