Fix channel_combine test race condition on ARM#27
Merged
Conversation
Replace collect() with eager iteration that reads values immediately from each chunk. This avoids holding references to pre-allocated buffer pool Memory objects across multiple chunks, which caused intermittent test failures on ARM (macOS aarch64) due to a suspected memory ordering issue with FixedSizeArray/Memory references in PipeChannel ring buffers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
=======================================
Coverage 74.21% 74.21%
=======================================
Files 8 8
Lines 543 543
=======================================
Hits 403 403
Misses 140 140 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
collect()with eager value reading in channel_combine testsFixedSizeMatrixDefaultreferences viacollect()Context
The
muxandaddfunctions use pre-allocated buffer pools for allocation-free steady-state operation. When tests usedcollect(), they accumulated references to these buffer poolMemoryobjects across all chunks. On ARM, this triggered a suspected memory ordering issue where collected references pointed to stale data.The fix reads values eagerly during iteration, matching production usage where each chunk is consumed immediately.
Test plan
🤖 Generated with Claude Code