Skip to content

dead chanel in UpdateNewAndDoneWatch #61782

Closed

Description

@xhebox

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

It started here

err = do.runawayManager.UpdateNewAndDoneWatch()
if err == nil {
logutil.BgLogger().Info("preparations for the runaway manager are finished and start runaway manager loop")
do.wg.Run(do.runawayManager.RunawayRecordFlushLoop, "runawayRecordFlushLoop")
do.wg.Run(do.runawayManager.RunawayWatchSyncLoop, "runawayWatchSyncLoop")
do.runawayManager.MarkSyncerInitialized()

will insert record into channels here

} else if ttl <= 0 {
rm.staleQuarantineRecord <- record
return

The receive loop however is started later than the first call of UpdateNewAndDoneWatch(RunawayRecordFlushLoop)

case r := <-staleQuarantineRecordCh:

If the channel exceeds the maximum(1024), it blocks.

introduced by #52283

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

non blocking.

3. What did you see instead (Required)

runawayStartLoop blocks forever

4. What is your TiDB version? (Required)

v8.1.0 and later

Activity

  1. added theissue type on Jun 17, 2025
  2. added 2 commits that reference this issue on Jul 5, 2025
    2d0da8e
    b7c4907
  3. seiya-annie commented on Aug 26, 2025

    @seiya-annie

    Upgrade branch meets this issue:
    source: <=8.1.0
    target: v8.1.1-v8.5.2
    blocking stage: post upgrade
    workaround: manually delete the rows in the table on the working tidb instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions