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

Merged
merged 4 commits into from
Dec 29, 2024

Conversation

dscho
Copy link
Member

@dscho dscho commented Dec 26, 2024

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

image

tyan0 and others added 2 commits December 25, 2024 14:30
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/[email protected]
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 <[email protected]>
Reviewed-by:
Signed-off-by: Takashi Yano <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
This hopefully will address those hangs in Git's test suite.

Signed-off-by: Johannes Schindelin <[email protected]>
@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 <[email protected]>
@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.

Since we're building in a minimal MSYS2 environment, `git` is not
available (at least not MSYS2's) and therefore the `configure` log would
show this:

  /d/a/msys2-runtime/msys2-runtime/winsup/configure: line 6858: git: command not found
  configure: WARNING: Could not determine msys2-runtime commit"

Let's work around this by using the `--with-msys2-runtime-commit` route.

Signed-off-by: Johannes Schindelin <[email protected]>
There was a spurious double-quote in the error message that is shown
when the commit could not be determined.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member Author

dscho commented Dec 29, 2024

Clearly there are still hanging tests.

Even though there are still hanging tests, the situation is improved a lot by this PR.

Having said that, if we cannot figure out a work-around or even a fix for those remaining new hangs, we will have to roll back MSYS2 runtime to v3.5.4 before releasing Git for Windows v2.48.0-rc1.

@dscho
Copy link
Member Author

dscho commented Dec 29, 2024

/open pr

The workflow run was started

@dscho
Copy link
Member Author

dscho commented Dec 29, 2024

When it rains, it pours: A pacman upgrade that happened in MSYS2 in the meantime uncovered a bug in the update-via-pacman.ps1 script that I have to fix first (PR here).

@dscho dscho merged commit 0202cf9 into git-for-windows:main Dec 29, 2024
3 checks passed
@dscho dscho deleted the special-case-sigflushfast-g4w branch December 29, 2024 12:36
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