Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-Authentication-Warning: atacama.four-d.de: mail set sender to using -f Message-ID: <3F9E67BF.50408@gmx.net> Date: Tue, 28 Oct 2003 13:57:35 +0100 From: Thomas Pfaff User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Arash Partow CC: cygwin AT cygwin DOT com Subject: Re: pthread problem with latest cygwin dll snapshot References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Arash Partow wrote: > Greetings to Thomas and all others involved in cygwin pthreads > implementation, > > I've downloaded the snapshots of cygwin1.dll (cygwin1-20031025.dll.bz2 and > cygwin1-20031027.dll.bz2), I think the prior is the one where Thomas made > changes and in the latter Corinna made changes to semaphores which I don't > how that might effect pthreads. In both cases the stress test can run > successfully under certain circumstances (which for normal application > execution are not acceptable) in-one instance reaching 9million+ thread > creations, however if one tries to do other things like edit a text file or > play an mp3 or some other task, the Thread-Test will crash. In GDB the call > stack shows the last call before the crash was to the cygwin1.dll, also > sometimes if you try to restart the Thread-Test right after it has crashed, > the new instance crashes almost immediately only ever getting up to about > ~5000 thread creations. Hi Arash, this time i am not able to reproduce your problem. Before i continue debugging i suggest that you check the return codes of some pthread API functions first and call the pthread_functions only with a valid thread id. For example change void Thread::start() { pthread_create(&threadID,NULL,&(Thread::threadFunction),this); pthread_detach(threadID); } to void Thread::start() { int res; res = pthread_create(&threadID,NULL,&(Thread::threadFunction),this); if (res) setThreadState(THREAD_DEAD); else pthread_detach(threadID); } Please contact me if this still doesn't help. Thomas -- 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/