You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix direct-send allocation test failure on main #115
SenderTests.Direct_send_has_zero_steady_state_allocations_with_the_default_serializer(False) expected 0 allocated bytes but measured 280 at tests/Relayer.Tests/SenderTests.cs:337. The Release build passed; 583 other tests passed. This is the first attempt, and no infrastructure error appears in the failed log.
Reproduce with dotnet test -c Release on the commit, or focus the SenderTests allocation case using the TUnit tree filter. Investigate whether the bytes come from the send pipeline or measurement/runtime setup; do not weaken the zero-allocation contract or rerun CI merely for green.
Acceptance criteria:
Identify and fix the cause of the unexpected measured allocation.
Preserve an exact zero-byte steady-state assertion for direct sends with both scalar-key options.
Validate the focused cases and the Release suite; record environment limits if Linux-only reproduction requires hosted CI.
The old prerequisite is cleared: #111 merged and run 41316941844 succeeded. Main run 41318498696 is a separate intermittent allocation failure, not an infrastructure failure.
Linux diagnostics reproduced 280 B in both timer arming and timer cleanup, outside serialization and dispatch. A separate BCL-only probe that deliberately contends a CancellationTokenSource timer-queue lock also allocates runtime wait state (56 B in that controlled case). The runtime's TimerQueueTimer.Change uses a shared TimerQueue lock, whose first contended wait lazily creates an AutoResetEvent. The batch allocation comparison also reproduced a 280 B excess under concurrent suite execution.
The fix isolates the three send/timer-backed allocation tests with unkeyed TUnit NotInParallel. It keeps all warmup loops and exact zero-byte/baseline assertions, changes no production code, and leaves other tests parallel. Validation is in progress on Windows and Linux. Main has since passed run 41319039245, which confirms intermittency rather than resolving the measurement race.
Activity
thomhurst commentedon Nov 1, 2026
The old prerequisite is cleared: #111 merged and run 41316941844 succeeded. Main run 41318498696 is a separate intermittent allocation failure, not an infrastructure failure.
Linux diagnostics reproduced 280 B in both timer arming and timer cleanup, outside serialization and dispatch. A separate BCL-only probe that deliberately contends a CancellationTokenSource timer-queue lock also allocates runtime wait state (56 B in that controlled case). The runtime's TimerQueueTimer.Change uses a shared TimerQueue lock, whose first contended wait lazily creates an AutoResetEvent. The batch allocation comparison also reproduced a 280 B excess under concurrent suite execution.
The fix isolates the three send/timer-backed allocation tests with unkeyed TUnit NotInParallel. It keeps all warmup loops and exact zero-byte/baseline assertions, changes no production code, and leaves other tests parallel. Validation is in progress on Windows and Linux. Main has since passed run 41319039245, which confirms intermittency rather than resolving the measurement race.
fix: isolate timer-backed allocation measurements (#115) (#116)