Skip to content

[Bug]: post-cancellation multi-CN percentile replay times out in race UT #33157

Done

Description

@XuPeng-SH

Is there an existing issue for the same bug?

Branch Name

main (observed in PR #33133 race UT)

Commit ID

CI head 47a691fe61df0bce9bab07cea80fe0f0a714de39; the same test exists on main 568f0f4fdee3c34373f27b04316a2adf7d32a78a.

Other Environment Information

Actual Behavior

pkg/tests/issues/isolated.TestIssue29492MultiCNCancellationCleanup/text reached the post-KILL same-connection replay at issue_29492_test.go:195 and failed with context deadline exceeded after the three-minute subtest budget. The original canceled statement returned its expected interruption; the subsequent replay ran for about 138 seconds before the client deadline.

At 08:25:51 UTC the replay's remote pipeline reported a delayed terminal drain with one outstanding 65,602-byte batch. This is a waiting-state observation, not proof of a missing ACK, deadlock, slow disk, or a production regression. No pre-deadline goroutine snapshot is available in this run.

Expected Behavior

After cancellation and remote-stream quiescence, the same connection and the same query should complete with the expected result. A stalled run should retain enough concurrent sender/receiver and goroutine evidence to distinguish a real pipeline liveness problem from test instrumentation or resource contention.

Steps to Reproduce

Inspect the linked run, or run:

go test -race -count=1 -run '^TestIssue29492MultiCNCancellationCleanup$' ./pkg/tests/issues/isolated

The exact Linux failure has not yet been reproduced locally. A macOS/arm64 race run passed, as did three repetitions each with GOMAXPROCS=2 for the original test and for a temporary control disabling the fault registry during replay. Those controls do not replicate the concurrent 8-CPU Linux runner.

Additional information

Capture synchronized stacks before the replay deadline and trace the receiver, batch forwarding, ACK and terminal-drain paths. The SQL fault function calls the test fault registry per evaluated row while enabled; its contribution is unproven. Do not weaken the KILL, remote cleanup, same-connection or prepared-statement reuse assertions merely to make the test pass.

Metadata

Metadata

Assignees

Labels

kind/bugneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions