From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15237 invoked by alias); 16 Mar 2009 13:14:18 -0000 Received: (qmail 15224 invoked by uid 22791); 16 Mar 2009 13:14:16 -0000 X-SWARE-Spam-Status: No, hits=0.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: sourceware.org Received: from mtagate1.de.ibm.com (HELO mtagate1.de.ibm.com) (195.212.17.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Mar 2009 13:14:12 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate1.de.ibm.com (8.13.1/8.13.1) with ESMTP id n2GDE99Z000482 for ; Mon, 16 Mar 2009 13:14:09 GMT Received: from d12av04.megacenter.de.ibm.com (d12av04.megacenter.de.ibm.com [9.149.165.229]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n2GDE9g81998858 for ; Mon, 16 Mar 2009 14:14:09 +0100 Received: from d12av04.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n2GDE9Jb022688 for ; Mon, 16 Mar 2009 14:14:09 +0100 Received: from d12ml068.megacenter.de.ibm.com (d12ml068.megacenter.de.ibm.com [9.149.164.163]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n2GDE9r0022682 for ; Mon, 16 Mar 2009 14:14:09 +0100 Subject: Pthread_join waits endlessly for already ended thread X-KeepSent: 7146E8FC:8465018C-C125757B:0048A806; type=4; name=$KeepSent To: pthreads-win32@sourceware.org Message-ID: From: Torsten Andre2 Date: Mon, 16 Mar 2009 13:14:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2009/txt/msg00015.txt.bz2 Hello, I'm having trouble concerning pthread_join as described in this [1] posting. A "thread A" endlessly waits for an already ended "thread B" which called "return NULL" or "pthread_exit(NULL)" (tried both). Sometimes it seems if you wait long enough thread A passes the pthread_join statement, though not always. Unfortunately I haven't been able to find anything in the mail archive, though I am sure that this has been covered before. Thread B hangs while calling longjmp (sp->start_mark, exception) in ptw32_throw.c. I have read about the different styles to cleanup, but I have to admit that currently I don't understand what they are about. All that matters is that I get pthreads to execute properly at the moment. I downloaded pthreads 2.8.0 source code and use Visual Studio 2008 Professional C++ to compile it using Win32-Debug settings on a Windows Server 2008 x64 system. I haven't changed any settings of the VC++ project . The program calling pthread functions is written in C++. Besides using the source code without any alterations, I also tried to use the binary dll versions VC2 and VCE2. Both dll's did not solve the problem. In [1] Ross states the problem may be another dllmain being called. Though I don't believe that's the problem in my case, I don't define any other dllmains but the one in Pthreads. Most probably, I guess, the problem is a wrong defined symbol or something related. Can someone please give me a hint how to get pthread to work properly? Any help is highly appreciated. Thank you. Cheers, Torsten [1] http://www.nabble.com/pthread_join-problem-td9687824.html