- Notifications
You must be signed in to change notification settings - Fork749
Work around potential Mono bug, that hangs the runtime when new threads start#1779
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
88ecef6
to64a04d3
Comparelostmsu commentedMay 2, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
:/ it does not fail when the blame mode is on in On my own machine I was able to reproduce it on the first try, but then it never reproduced after that. :/ |
lostmsu commentedMay 2, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Looks like the issue may be with the |
854f20b
to8d9d27e
Compare8d9d27e
tof730963
CompareThis is probably also something that we should include in our docs. |
Uh oh!
There was an error while loading.Please reload this page.
I suspect the issue is actually with Mono GC and the relatively new mode of suspending threads, which has a few (closed) bugs against it, complaining about hangs. In many of those bugs (you can find themhere) switching to the old
preemptive
mode works around the issue. I tried it for our tests, and it seems to solve it too.The issue also vaguely mentioned inhttps://www.mono-project.com/docs/advanced/runtime/docs/coop-suspend/#thread-startfinish-still-bad
So the fix is to simply set
MONO_THREADS_SUSPEND
topreemptive
in CI before running tests in Mono.Fixes#1766
This workaround seems to solve the issue on my local machine as well as in CI. I did 5+ CI full matrix reruns to confirm. Before the fix a few MacOS legs would time out in every run.
Below is some history of finding this workaround.