New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Async::Semaphore#async allows tasks to execute concurrently" on async-1.x fails with slow CPU/low-res timer #218
Comments
I can probably fix this, it looks like the test is probably racy. |
This should be fixed, do you mind checking it? |
That does fix this specific problem, thank you! I reran the test suite again and now interestingly everything passes with Ruby 2.7, but I get two failures under Ruby 3.0. The first one is reproducible, while the second one is intermittent. Should I create a new issue for this, or just keep it under this one?
|
It's okay to keep it under one issue. Let me check what's going on. |
I can reproduce this too - the patch helps with the original failures, but I get the same sporadic failure with that patch. Most of the time it passes though. |
Okay, I'm taking a look now. |
I've improved the robustness of the two mentioned tests. Do you mind checking whether that's fixed the issues you were experiencing? |
Sure, let me take a look, thanks! 🔬 |
@thesamesam how did you get on? |
@matoro are you able to try the latest changes to |
If I recall, this issue was on hppa, so I reran this test and strangely everything passed even without the newest commit - tested on ruby 3.0 and 3.1. I'm not sure exactly what could have changed to cause this to mysteriously disappear, but if it works it works and I won't complain 👍 Just to be safe I also tested with this newest commit and everything still passed, so I'm good to consider this fixed. |
If it shows up again, please feel free to let me know! (Timing issues and related tests can be super tricky). |
Sorry, the container needed upgrading and it took about a day. I also wish I'd said in my original comment which box it was, but I'm pretty certain it was HPPA. It took me a while to reproduce. I can't reproduce it anymore in our packaging w/ 1.31.0, but I did manage to hit it just now by running I've now tried |
Awesome, thanks for all your effort! |
Hi, with async-1.x the test "Async::Semaphore#async allows tasks to execute concurrently" fails when run on a system with a slow CPU and/or low-resolution timers. The same test passes in async-2.x on the same system.
Tested async-1.30.3, async-1.31.0 with ruby 2.7, ruby 3.0, ruby 3.1, all exhibit the same failure. No 2.x version exhibits the issue.
I thought that f0e520d might be related so I tried adjusting the sleep times to 0.01 rather than 0.1, but this did not solve the issue.
I can provide shell access on demand if this information is not sufficient. Thanks!
The text was updated successfully, but these errors were encountered: