Re: [PATCH v3] cygthread: suspend thread before terminating.

2024-11-25 Thread Corinna Vinschen
On Nov 22 09:56, Jeremy Drake via Cygwin-patches wrote: > On Fri, 22 Nov 2024, Corinna Vinschen wrote: > > > > wait_thread is happily waiting in ReadFile, while the main thread is > > > hanging in ForceCloseHandle1 (close_h, rd_proc_pipe);. > > > > which is one of the great annoyances of Windo

Re: [PATCH v3] cygthread: suspend thread before terminating.

2024-11-22 Thread Jeremy Drake via Cygwin-patches
On Fri, 22 Nov 2024, Corinna Vinschen wrote: > > wait_thread is happily waiting in ReadFile, while the main thread is > > hanging in ForceCloseHandle1 (close_h, rd_proc_pipe);. > > which is one of the great annoyances of Windows. CloseHandle > on a pipe should never hang, but... well... Yeah

Re: [PATCH v3] cygthread: suspend thread before terminating.

2024-11-22 Thread Corinna Vinschen
On Nov 21 17:20, Jeremy Drake via Cygwin-patches wrote: > On Wed, 20 Nov 2024, Jeremy Drake via Cygwin-patches wrote: > > > On Wed, 20 Nov 2024, Corinna Vinschen wrote: > > > > > Patch pushed. > > > > Thanks, folks on ARM64 will be very happy to see that deadlock gone. > > MSYS2 already made a rel

Re: [PATCH v3] cygthread: suspend thread before terminating.

2024-11-21 Thread Jeremy Drake via Cygwin-patches
On Wed, 20 Nov 2024, Jeremy Drake via Cygwin-patches wrote: > On Wed, 20 Nov 2024, Corinna Vinschen wrote: > > > Patch pushed. > > Thanks, folks on ARM64 will be very happy to see that deadlock gone. > MSYS2 already made a release based on v2 of the patch, and Git for Windows > at least merged tha

Re: [PATCH v3] cygthread: suspend thread before terminating.

2024-11-20 Thread Jeremy Drake via Cygwin-patches
On Wed, 20 Nov 2024, Corinna Vinschen wrote: > Patch pushed. Thanks, folks on ARM64 will be very happy to see that deadlock gone. MSYS2 already made a release based on v2 of the patch, and Git for Windows at least merged that version of the patch too, and is looking forward to making a release wi

Re: [PATCH v3] cygthread: suspend thread before terminating.

2024-11-20 Thread Corinna Vinschen
Hi Jeremy, On Nov 19 13:58, Jeremy Drake via Cygwin-patches wrote: > On Tue, 19 Nov 2024, Corinna Vinschen wrote: > > > On Nov 19 11:06, Jeremy Drake via Cygwin-patches wrote: > > > (I searched for other callers of terminate_thread after this, and the only > > > one left without CancelSynchronous

Re: [PATCH v3] cygthread: suspend thread before terminating.

2024-11-19 Thread Jeremy Drake via Cygwin-patches
On Tue, 19 Nov 2024, Corinna Vinschen wrote: > On Nov 19 11:06, Jeremy Drake via Cygwin-patches wrote: > > (I searched for other callers of terminate_thread after this, and the only > > one left without CancelSynchronousIo is in ldap.cc and I'm pretty sure > > that's a "can't happen" case.) > > I'

Re: [PATCH v3] cygthread: suspend thread before terminating.

2024-11-19 Thread Corinna Vinschen
On Nov 19 11:06, Jeremy Drake via Cygwin-patches wrote: > (I searched for other callers of terminate_thread after this, and the only > one left without CancelSynchronousIo is in ldap.cc and I'm pretty sure > that's a "can't happen" case.) I'm inclined to push your patch, but I'm not quite sure her

[PATCH v3] cygthread: suspend thread before terminating.

2024-11-19 Thread Jeremy Drake via Cygwin-patches
From: Jeremy Drake This addresses an extremely difficult to debug deadlock when running under emulation on ARM64. A relatively easy way to trigger this bug is to call `fork()`, then within the child process immediately call another `fork()` and then `exit()` the intermediate process. It would s