X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4ACE0301.3090508@gmail.com> Date: Thu, 08 Oct 2009 16:19:29 +0100 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Thread related crash References: <4ACDCA99 DOT 9090400 AT cwilson DOT fastmail DOT fm> In-Reply-To: <4ACDCA99.9090400@cwilson.fastmail.fm> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Charles Wilson wrote: > I have an idea why this is happening: I'm managing these threads > manually using the windows API calls: CreateThread, WaitForSingleObject, > SetEvent, etc. They are NOT actually started by cygwin's thread > launching facilities (e.g. pthread). Then you are doomed. Cygwin's pthread layer will believe that every single foreign thread is in fact the same thread, and they will all crash happily through each other's mutexes. Fun'n'games result. (This is the same kind of problem that the half-ming-half-cyg gnat implementation suffers.) cheers, DaveK -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple