-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Bug: Allocation in GC warning suppression proc blocks process #11728
Comments
I see it runs when setting |
I can confirm this on my machine. The example where the input hangs issues a GC warning on 1.2 but that's been disabled in 1.3 (#11289). It also really saturates all cores for a while on 1.2. But on 1.3 there's a short initial burst, then the threads seem to sit idle. So something's blocking. It's interesting that it works for CRYSTAL_WORKERS=2. |
Actually #11289 seems to be the culprit. Reverting that change makes the program run successfully on 1.3.0. I think the reason is this: Line 135 in a3ee70c
The call to |
Thanks @straight-shoota for quickly tracking this down and fixing. Will there be a 1.3.1 to include this, et al, fixes before 1.4.0? |
Yes, this regression should land in 1.3.1. |
Thank you! |
🤦♂️ Argh. I should have seen that was an issue. |
Yeah we all missed that despite C bindings needing extra care (especially without specs) 🙈 |
System: System76 laptop; i7-67000HQ, 4C|8T; 2.6-3.5 GHz; 16GB mem; Linux 5.15.13.
Running some code with 1.3.0 I found a bug in multi-threading that ran fine with 1.2.2.
Here's the code: https://gist.github.com/jzakiya/2b65b609f091dcbb6f792f16c63a8ac4
Here's how its compiled:
crystal build twinprimes_ssoz.cr -Dpreview_mt --release
Here are some inputs that show working and non-working examples.
This input works:
CRYSTAL_WORKERS=8 ./twinprimes_ssoz 50000000000000000 50000000019000000
This input hangs:
CRYSTAL_WORKERS=8 ./twinprimes_ssoz 50000000000000000 50000000119000000
The text was updated successfully, but these errors were encountered: