Skip to content

log_backup: TiDB may panic when canceling task. #50839

@YuJuncen

Description

@YuJuncen

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Register a task.
  2. Let TiKV make a flush.
  3. At the same time, remove the task.

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

The task has been safely removed.

3. What did you see instead (Required)

TiDB panicked at the event handler of the subscriber.

goroutine 143 [running]:
github.com/pingcap/tidb/br/pkg/streamhelper/spans.(*ValueSortedFull).MergeAll(0x0, {0x140008d5f18, 0x1, 0x10673fc38?})
        /Volumes/eXternal/Developer/tidb/br/pkg/streamhelper/spans/value_sorted.go:49 +0xac
github.com/pingcap/tidb/br/pkg/streamhelper/spans.(*ValueSortedFull).Merge(...)
        /Volumes/eXternal/Developer/tidb/br/pkg/streamhelper/spans/value_sorted.go:38
github.com/pingcap/tidb/br/pkg/streamhelper.(*CheckpointAdvancer).SpawnSubscriptionHandler.func1()
        /Volumes/eXternal/Developer/tidb/br/pkg/streamhelper/advancer.go:483 +0x33c
created by github.com/pingcap/tidb/br/pkg/streamhelper.(*CheckpointAdvancer).SpawnSubscriptionHandler in goroutine 141
        /Volumes/eXternal/Developer/tidb/br/pkg/streamhelper/advancer.go:469 +0x2a0

4. What is your TiDB version? (Required)

v6.5.3

Metadata

Metadata

Assignees

No one assigned

    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.component/brThis issue is related to BR of TiDB.found/gsfound by gsreport/customerCustomers have encountered this bug.severity/majortype/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