Repository navigation
Stop MemoryTest hanging CI on macOS - #248
Merged
Merged
Conversation
waitAndNotifyWithAtomicsOnSameWord ran a task that never ends on the ForkJoin common pool, submitted its waiter to the same pool, then spun with no deadline until the waiter was parked. On JDK 17 and 21 the common pool, which has two workers on the 3-core macOS runners, can leave that waiter queued while its idle worker stays parked, so the spin never ends and the job hangs until GitHub's 6 hour timeout. Run both tasks on two threads of their own instead. The CI job also gets a 60 minute timeout, about twice its usual duration, so a hang can no longer hold a runner for 6 hours.
Contributor
Author
|
Fix #247 |
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.
Since #237, CI jobs on macOS with JDK 17 or 21 hang in
MemoryTestuntil GitHub's 6 hour timeout, on PRs and on main.waitAndNotifyWithAtomicsOnSameWordran a task that never ends on the ForkJoin common pool, submitted its waiter to the same pool, then spun with no deadline until the waiter was parked. On JDK 17 and 21 the common pool, which has two workers on the 3-core macOS runners, can leave that waiter queued while its idle worker stays parked. A pool dump at the hang showssubmissions = 1, one worker spinning and the otherWAITING, so the test spins forever. Linux and Windows runners have 4 cores, which is why only macOS hangs.The fix runs both tasks on two threads of their own. The memory code itself is unaffected.
Running
MemoryTestalone pinned to 3 cores (taskset -c 0-2):The CI job also gets
timeout-minutes: 60, about twice its usual duration, so a hang fails within the hour instead of holding a runner for 6 hours.