Re: [1.7] pthread_mutex_lock/pthread_mutex_unlock strange blocking problem

2009-06-03 Thread Thomas Stalder
The patchs from DaveK seems to correct all the problems. Thanks to DaveK for his great and quick work. Thomas 2009/6/3 Dave Korn : > Thomas Stalder wrote: >> Hello, >> >> Sometimes pthread_mutex_lock ou pthread_mutex_unlock block. > >  Thank you very much for the simple testcases.  I have locate

Re: [1.7] pthread_mutex_lock/pthread_mutex_unlock strange blocking problem

2009-06-03 Thread Dave Korn
Thomas Stalder wrote: > Hello, > > Sometimes pthread_mutex_lock ou pthread_mutex_unlock block. Thank you very much for the simple testcases. I have located an invalid racy optimisation in cygwin's internal lock handling that leads to a deadlock owing to unmatched lock acquire/releases, and pos

Re: [1.7] pthread_mutex_lock/pthread_mutex_unlock strange blocking problem

2009-06-03 Thread Corinna Vinschen
On Jun 3 01:12, Dave Korn wrote: > Corinna Vinschen wrote: > > On Jun 2 16:11, Thomas Stalder wrote: > >> Hello, > >> > >> Sometimes pthread_mutex_lock ou pthread_mutex_unlock block. > > > > Isn't that basically the same problem Dave sent the patch to fix the > > hangs in pthread_create? > > >

Re: [1.7] pthread_mutex_lock/pthread_mutex_unlock strange blocking problem

2009-06-02 Thread Dave Korn
Corinna Vinschen wrote: > On Jun 2 16:11, Thomas Stalder wrote: >> Hello, >> >> Sometimes pthread_mutex_lock ou pthread_mutex_unlock block. > > Isn't that basically the same problem Dave sent the patch to fix the > hangs in pthread_create? > Nope, the problem reproduces for me even with the c

Re: [1.7] pthread_mutex_lock/pthread_mutex_unlock strange blocking problem

2009-06-02 Thread Corinna Vinschen
On Jun 2 16:11, Thomas Stalder wrote: > Hello, > > Sometimes pthread_mutex_lock ou pthread_mutex_unlock block. Isn't that basically the same problem Dave sent the patch to fix the hangs in pthread_create? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cyg

[1.7] pthread_mutex_lock/pthread_mutex_unlock strange blocking problem

2009-06-02 Thread Thomas Stalder
Hello, Sometimes pthread_mutex_lock ou pthread_mutex_unlock block. In order to reproduce the problem, I have made a test application (test.c) who always block $ gcc test.c -o test $ ./test thread id=1 after pthread_create 1 after pthread_create 2 thread id=2 thread id=3 after pthread_create 3 af