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

Cygwin: revert use of CancelSyncronousIo on wait_thread. #243

Merged

Conversation

jeremyd2019
Copy link
Member

@jeremyd2019 jeremyd2019 commented Nov 22, 2024

It appears this is causing hangs on native x86_64 in similar scenarios
as the hangs on ARM64, because CancelSynchronousIo is returning TRUE
but not canceling the ReadFile call as expected.

Addresses: msys2/MSYS2-packages#4340 (comment)
Fixes: b091b47 ("cygthread: suspend thread before terminating.")

created via git checkout 16dfe943bcba396ac0b11c5b52cdbaeed4e03a8d -- sigproc.cc pinfo.cc

Copy link
Collaborator

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me; I'd love some more details in the commit message, but won't insist on them (following the link provides some context, it's just that it relies on a working internet/GitHub).

@jeremyd2019
Copy link
Member Author

jeremyd2019 commented Nov 22, 2024

This was a quick and dirty commit for testing, in response to msys2/MSYS2-packages#4340 (comment) - I fired up some tests to run while I slept, and they seem to not have hung on either x86_64 or ARM64, so I can come back to this and clean up the commit message and submit to cygwin-patches once approved here

@jeremyd2019 jeremyd2019 force-pushed the msys2-3.5.4-no-cancelsynchronousio branch from d8ac68d to d142cc5 Compare November 22, 2024 17:39
@jeremyd2019 jeremyd2019 requested a review from dscho November 22, 2024 17:40
@jeremyd2019 jeremyd2019 marked this pull request as ready for review November 22, 2024 17:55
It appears this is causing hangs on native x86_64 in similar scenarios
as the hangs on ARM64, because `CancelSynchronousIo` is returning `TRUE`
but not canceling the `ReadFile` call as expected.

Addresses: msys2/MSYS2-packages#4340 (comment)
Fixes: b091b47 ("cygthread: suspend thread before terminating.")
Signed-off-by: Jeremy Drake <cygwin@jdrake.com>
@jeremyd2019 jeremyd2019 force-pushed the msys2-3.5.4-no-cancelsynchronousio branch from d142cc5 to 2eb6be1 Compare November 22, 2024 19:48
Copy link
Collaborator

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

@dscho dscho merged commit 2eb6be1 into msys2:msys2-3.5.4 Nov 23, 2024
1 check passed
dscho added a commit to dscho/MSYS2-packages that referenced this pull request Nov 23, 2024
This change seems to have caused hangs on x86_64, so let's revert it.

Addresses msys2#4340 (comment)
and corresponds to msys2/msys2-runtime#243.

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

dscho commented Nov 23, 2024

msys2/MSYS2-packages#5019

lazka pushed a commit to msys2/MSYS2-packages that referenced this pull request Nov 23, 2024
This change seems to have caused hangs on x86_64, so let's revert it.

Addresses #4340 (comment)
and corresponds to msys2/msys2-runtime#243.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@jeremyd2019 jeremyd2019 deleted the msys2-3.5.4-no-cancelsynchronousio branch November 23, 2024 16:26
@jeremyd2019
Copy link
Member Author

@jeremyd2019
Copy link
Member Author

6614da9

stahta01 pushed a commit to stahta01/MSYS2-cygwin-packages that referenced this pull request Dec 21, 2024
This change seems to have caused hangs on x86_64, so let's revert it.

Addresses msys2/MSYS2-packages#4340 (comment)
and corresponds to msys2/msys2-runtime#243.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
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