Skip to content

test(runtime): stabilize wakeup latch publication flake - #607

Merged
SunSi12138 merged 1 commit into
devfrom
fix/issue-387-wakeup-followup
Sep 8, 2026
Merged

SunSi12138 merged 1 commit into
devfrom
fix/issue-387-wakeup-followup

Conversation

@SunSi12138

@SunSi12138 SunSi12138 commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

Refs #387.

Root cause

WakeupSignalTests.LateLatchCrossingArmPublicationStillCompletesTheArm starts a synthetic writer with Task.Run and immediately gives that actor 5s to reach the deterministic BeforeLatchWrite seam. The actor then blocks synchronously on releaseWriter.Wait().

Under shared ThreadPool pressure, that local 5s bound can expire before the synthetic actor is scheduled, before the production race under test has begun. Once the seam is reached, the late-latch publication interleaving is deterministic.

Fix

Run that synthetic blocking writer through the existing LongRunningTestWorker.

This preserves:

  • the exact late-latch interleaving;
  • the 5s bound for reaching the seam;
  • the 5s writer-finish/liveness bound;
  • all stale-latch/arm correctness assertions.

No timeout widening, retries, production changes, or workflow changes.

Scope

One root-cause commit / one test file.

The newer SharpLinkReconnectPolicyLifecycleRaceTests.FixedReconnectSuccessShouldResetTheNextFailureSequenceAfterPolicyUpdate recurrence remains watch-only. #604 already replaced the post-manual-time dial-start polling with direct transport-entry signals; the new 30s test-level timeout did not identify which deterministic phase stalled, and static review of reconnect generation publication, delay wake, reconnect ownership, and success reset found no closed lost-wakeup/reset defect. No speculative reconnect change is included.

Validation

Exact head 9c129bedbb4cc2d601e5034ea9df9a48b057c81d:

  • PR Fast #1331 / run 34248405367: passed, including Unit Tests and allocation gate.
  • CodeQL #3642 / run 34248405135: passed.

No local .NET execution was used.

@SunSi12138 SunSi12138 reopened this Sep 8, 2026
@SunSi12138
SunSi12138 marked this pull request as ready for review September 8, 2026 16:07
@SunSi12138
SunSi12138 merged commit f265492 into dev Sep 8, 2026
38 of 44 checks passed
@SunSi12138
SunSi12138 deleted the fix/issue-387-wakeup-followup branch September 8, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant