delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/02/09:54:32

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4A24FD89.8090105@gmail.com>
References: <9bfd07db0906020210h57d4c12h62f47a6ba3a5730e AT mail DOT gmail DOT com> <4A24FD89 DOT 8090105 AT gmail DOT com>
Date: Tue, 2 Jun 2009 15:54:16 +0200
Message-ID: <9bfd07db0906020654p5bc82a31g965eaec4e9e383eb@mail.gmail.com>
Subject: Re: [1.7] pthread_create block
From: Thomas Stalder <cygwinml AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hello,

I have tried the patch and my test application seem now working well.

Many thanks

--
Thomas


2009/6/2 Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>:
> Thomas Stalder wrote:
>
>> Sometimes pthread_create block and never return.
>>
>> I have made a simple program (test.c) to reproduce the problem.
>>
>>> gcc test.c -lpthread -o test
>>> ./test
>> thread id=3D1
>> thread id=3D2
>> thread id=3D3
>> thread id=3D4
>> ........
>> thread id=3D3736
>>
>>
>> Sometimes pthread_create block after creating arround 10 threads,
>> sometimes after creating arround 10000 threads or more.
>
> =A0You may have run into the pthread interlocking bug that I'm tracking d=
own in
> this thread on the cygwin-dev list:
>
> =A0 =A0http://www.cygwin.com/ml/cygwin-developers/2009-05/threads.html#00=
084
>
> =A0If you'd like to try building the cygwin DLL yourself from the CVS sou=
rces
> with the attached patch applied, you may find it solves your problem; at =
least
> for me it does. =A0I've been running your test program while writing this=
 email
> and it's got as far as this:
>
> thread id=3D1260546
> thread id=3D1260547
>
> ... without a hiccup. =A0Actually, now it's got as far as
>
> thread id=3D2405875
>
> by the time I diff'd the patch for you. =A0(If you'd prefer, I could send=
 you a
> binary of the DLL built with the patch, off-list; let me know).
>
> =A0 =A0cheers,
> =A0 =A0 =A0DaveK
>
> --
> Unsubscribe info: =A0 =A0 =A0http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: =A0 =A0 =A0 http://cygwin.com/problems.html
> Documentation: =A0 =A0 =A0 =A0 http://cygwin.com/docs.html
> FAQ: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://cygwin.com/faq/
>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019