Re: [Mingw-w64-public] [PATCH 2/2] winpthreads/cond.c: Do not wait for `sema_b` unless `waiters_count_lock_` has been locked in wait functions.

2019-05-06 Thread Andrew Ng
On Mon, 6 May 2019 at 12:13, Martin Storsjö wrote: > > FWIW, if you have LLVM built as DLLs instead of statically linked into > LLD, there's some known issues regarding hangs as well. Not sure if this > is what you're running into though. > Thanks for the information. I have seen mention of thes

Re: [Mingw-w64-public] [PATCH 2/2] winpthreads/cond.c: Do not wait for `sema_b` unless `waiters_count_lock_` has been locked in wait functions.

2019-05-06 Thread Andrew Ng
On Tue, 30 Apr 2019 at 04:12, Liu Hao wrote: > 在 2019/4/30 上午1:45, Andrew Ng 写道: > > I have tried out this patch and it appears to resolve the main LLD > deadlock > > issues. Some deadlocks still occur when running the LLD test suite, but > > this is kind of expected.

Re: [Mingw-w64-public] [PATCH 2/2] winpthreads/cond.c: Do not wait for `sema_b` unless `waiters_count_lock_` has been locked in wait functions.

2019-04-29 Thread Andrew Ng
I have tried out this patch and it appears to resolve the main LLD deadlock issues. Some deadlocks still occur when running the LLD test suite, but this is kind of expected. My only slight concern is that there is a wait for `sema_b` in pthread_cond_destroy which occurs without the `waiters_count_

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-23 Thread Andrew Ng
Any feedback on this patch? Cheers, Andrew On Fri, 12 Apr 2019 at 16:50, Andrew Ng wrote: > Sorry about that. I was hoping that a ".diff" file might make it through > to the mailing list, as I thought that I had seen other such file > attachments in some of the other mess

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-12 Thread Andrew Ng
JonY via Mingw-w64-public < mingw-w64-public@lists.sourceforge.net> wrote: > On 4/12/19 1:49 AM, Andrew Ng wrote: > > I have attached a minimal patch that fixes the deadlock issue. > > > > The principle change to avoid deadlock, is to not wait whilst holding the > > &

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-11 Thread Andrew Ng
"sema" functions. Cheers, Andrew On Mon, 8 Apr 2019 at 23:36, Liu Hao wrote: > 在 2019/4/8 21:16, Andrew Ng 写道: > > Do you want me to split up the patch? > > > > Yes. At least you should have proposed a minimum patch that explains why > the old code was broken and

Re: [Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-08 Thread Andrew Ng
he removal of locking from the sema routines count as a separate change? Are there any other rules or guidelines I need to be aware of? Cheers, Andrew On Mon, 8 Apr 2019, 20:00 Liu Hao, wrote: > 在 2019/4/8 下午12:07, Andrew Ng 写道: > > OK, no problem. Hopefully, the attachment with this m

[Mingw-w64-public] [PATCH] Fix potential deadlock in pthread condition variable

2019-04-07 Thread Andrew Ng
Hi, I have taken a look at issue https://sourceforge.net/p/mingw-w64/bugs/597, which I recently ran into again (had hoped it would have been fixed by now). I have attached a patch with a proposed fix to the MinGW-w64 winpthreads. I have been running this patch for a little while now and it appear