-
Notifications
You must be signed in to change notification settings - Fork 42
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
backport patches for hangs #253
backport patches for hangs #253
Conversation
c5422e5
to
0f82cd1
Compare
As these are for testing, apply them separately and leave the msys2-runtime PR as a draft for now (msys2/msys2-runtime#253).
746c3d7
to
aa2ce2a
Compare
As these are for testing, apply them separately and leave the msys2-runtime PR as a draft for now (msys2/msys2-runtime#253).
aa2ce2a
to
b6a94e2
Compare
As these are for testing, apply them separately and leave the msys2-runtime PR as a draft for now (msys2/msys2-runtime#253).
…ent" This reverts commit a22a0ad to apply a new patch for the same purpose. Signed-off-by: Takashi Yano <[email protected]>
b6a94e2
to
365766a
Compare
As these are for testing, apply them separately and leave the msys2-runtime PR as a draft for now (msys2/msys2-runtime#253).
To allow cygwait() to be called in the signal handler, a locally created timer is used instead of _cygtls::locals.cw_timer if it is in use. Co-Authored-By: Corinna Vinschen <[email protected]> Signed-off-by: Takashi Yano <[email protected]> (cherry picked from commit ea19140)
The commit a22a0ad was not entirely correct. Even with the patch, some hangs still occur. This patch overrides the previous commit along with the patch that makes cygwait() reentrant, to fix these hangs. Addresses: https://cygwin.com/pipermail/cygwin/2024-December/256954.html Fixes: d243e51 ("Cygwin: signal: Fix deadlock between main thread and sig thread") Reported-by: Daisuke Fujimura <[email protected]> Reviewed-by: Corinna Vinschen <[email protected]> Signed-off-by: Takashi Yano <[email protected]> (cherry picked from commit 83afe3e)
365766a
to
adb9c01
Compare
As these are for testing, apply them separately and leave the msys2-runtime PR as a draft for now (msys2/msys2-runtime#253).
It seems that current _cygtls::handle_SIGCONT() code sometimes falls into a deadlock due to frequent TLS lock/unlock operation in the yield() loop. With this patch, the yield() in the wait loop is placed outside the TLS lock to avoid frequent TLS lock/unlock. Fixes: 9ae51bc ("Cygwin: signal: Fix another deadlock between main and sig thread") Reviewed-by: Corinna Vinschen <[email protected]> Signed-off-by: Takashi Yano <[email protected]>
2be4821
to
ef4923e
Compare
These patches are all upstream now, whether we want to merge this to backport them to 3.5.5 or wait for 3.5.6 is an open question. |
Thanks. Since you already did the work, why not :) |
I've created msys2/MINGW-packages#23167 to maybe trigger the hangs, and verify that the patches help. But not sure how easy/likely that is though. |
Keep in mind these will all (including the prior attempted hang fix) need to be dropped in the rebase for 3.5.6 when that happens |
All jobs in msys2/MINGW-packages#23167 seem to hang now, so that's a good test at least :) |
Just got word that v3.5.6 is mere days out 🎉 |
FWIW (and this is in large part thanks to your encouragement, @jeremyd2019) I just merged git-for-windows/msys2-runtime#83 (which runs Git's test suite as part of |
It's out now. |
Draft PR is up (as well as the Git for Windows one so that we can catch regressions before merging). |
patches from 6172e52, cygwin/cygwin@176a306, cygwin/cygwin@12faeff, and cygwin/cygwin@f3a9f18