Skip to content
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

signal: Do not handle signal when __SIGFLUSHFAST is sent #80

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dscho
Copy link
Member

@dscho dscho commented Dec 26, 2024

This hopefully will address those hangs in Git's test suite:

image

After the commit d243e51ef1d3, zsh sometimes hangs at startup. This
occurs because SIGCHLD, which should trigger sigsuspend(), is handled
in cygwait() that is used to wait for a wakeup event in sig_send(),
even when __SIGFLUSHFAST is sent. Despite __SIGFLUSHFAST being
required to return before handling the signal, this does not happen.
With this patch, if the signal currently being sent is __SIGFLUSHFAST,
do not handle the received signal and keep it asserted after the
cygwait() for the wakeup event.  Apply the same logic to the cygwait()
in the retrying loop for WriteFile() as well.

Applied-from: https://inbox.sourceware.org/cygwin-patches/20241223013332.1269-1-takashi.yano@nifty.ne.jp
Addresses: https://cygwin.com/pipermail/cygwin/2024-December/256954.html
Fixes: d243e51ef1d3 ("Cygwin: signal: Fix deadlock between main thread and sig thread")
Reported-by: Daisuke Fujimura <booleanlabel@gmail.com>
Reviewed-by:
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho self-assigned this Dec 26, 2024
dscho added a commit to dscho/git-for-windows-automation that referenced this pull request Dec 26, 2024
Let's figure out whether
git-for-windows/msys2-runtime#80 actually
manages to address the CI hangs.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member Author

dscho commented Dec 26, 2024

/open pr

The workflow run was started

@dscho dscho marked this pull request as ready for review December 26, 2024 10:24
@dscho
Copy link
Member Author

dscho commented Dec 26, 2024

I've started a test run of Git's test suite with the MSYS2 runtime built in this here PR. It is looking good so far.

@dscho
Copy link
Member Author

dscho commented Dec 26, 2024

/open pr

The workflow run was started

Oh, but this failed because we can only branch-deploy fast-forwarding branches. D'oh.

@dscho
Copy link
Member Author

dscho commented Dec 26, 2024

I've started a test run of Git's test suite with the MSYS2 runtime built in this here PR. It is looking good so far.

Now it's no longer looking as good:

image

image

Clearly there are still hanging tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants