X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 10 Aug 2009 13:30:15 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: simple multithread program fails on Cygwin, succeeds on Linux Message-ID: <20090810113015.GK3204@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <200908101213 DOT 17744 DOT bruno AT clisp DOT org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200908101213.17744.bruno@clisp.org> User-Agent: Mutt/1.5.19 (2009-02-20) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Aug 10 12:13, Bruno Haible wrote: > Hi, > > The attached test program for pthread_once uses the following basic POSIX > threads functions: > pthread_create > pthread_join > pthread_mutex_init > pthread_mutex_lock > pthread_mutex_unlock > pthread_once > pthread_rwlock_init > pthread_rwlock_rdlock > pthread_rwlock_unlock > pthread_rwlock_wrlock > > On Linux with glibc 2.8: > $ gcc bug.c -O -Wall -lpthread -o bug > $ ./bug > Starting test_once ... OK > The test completes in about 4 seconds. > > On Cygwin 1.5.25(0.156/4/2): > $ gcc bug.c -O -Wall -o bug.exe > $ ./bug.exe > Starting test_once ... > Either it does not terminates (still running after half an hour, eating > 100% CPU time on one of the two CPUs), or it crashes rather quickly: > $ ./bug.exe > Starting test_once ...Segmentation fault (core dumped) WJFFM under Cygwin 1.7. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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