Skip to content

Fix: execution context queue stress test failures on CI [fixup #15345]#15630

Closed
ysbaddaden wants to merge 1 commit intocrystal-lang:masterfrom
ysbaddaden:fix/ec-queue-potential-fails
Closed

Fix: execution context queue stress test failures on CI [fixup #15345]#15630
ysbaddaden wants to merge 1 commit intocrystal-lang:masterfrom
ysbaddaden:fix/ec-queue-potential-fails

Conversation

@ysbaddaden
Copy link
Collaborator

It was possible for the threads to iterate 100 times and exit before the main thread had a chance to start pushing anything to the tested queue.

This might fix irregular Darwin failures on CI.

Related to #15342.

@ysbaddaden ysbaddaden added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Apr 3, 2025
@ysbaddaden ysbaddaden self-assigned this Apr 3, 2025
@ysbaddaden
Copy link
Collaborator Author

Apparently that broke MinGW. While macOS somtimes doesn't like Thread.sleep(1.nanosecond) it seems MinGW doesn't like Thread.yield. Sigh 😮‍💨

https://github.com/crystal-lang/crystal/actions/runs/14237952561/job/39901025833

If someone has an idea to synchronize the threads...

straight-shoota pushed a commit that referenced this pull request Sep 10, 2025
#16146)

The failure happens on both x86_64 and AArch64 and happens too often on CI. An attempt to fix it didn't work (#15630). I assume macOS threads and sleeps are doing something different than the spec expects 🤷

It never happens on other platforms which should be enough to stress test the thread safety of the feature.
@ysbaddaden ysbaddaden closed this Dec 2, 2025
@github-project-automation github-project-automation bot moved this from Review to Done in Multi-threading Dec 2, 2025
@ysbaddaden ysbaddaden deleted the fix/ec-queue-potential-fails branch December 2, 2025 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant