From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28131 invoked by alias); 2 Sep 2009 10:49:36 -0000 Received: (qmail 28072 invoked from network); 2 Sep 2009 10:49:19 -0000 Received: from unknown (86.35.15.72) by sourceware.org with QMTP; 2 Sep 2009 10:49:19 -0000 Received: (qmail 24922 invoked from network); 2 Sep 2009 10:49:14 -0000 Received: from 86-121-209-78.rdsnet.ro (HELO nexus.endion-software.com) (softplus@adslexpress.ro@[86.121.209.78]) (envelope-sender ) by proxy5.romtelecom.net (qmail-ldap-1.03) with SMTP for ; 2 Sep 2009 10:49:06 -0000 Received: from [10.243.1.171] (unknown [10.243.1.171]) by nexus.endion-software.com (Postfix) with ESMTP id 20A171069 for ; Wed, 2 Sep 2009 13:49:05 +0300 (EEST) Message-ID: <4A9E4D93.5050407@endion-software.com> Date: Wed, 02 Sep 2009 10:49:00 -0000 From: Laura Arhire User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: pthreads-win32@sourceware.org Subject: strange pthread_create cap Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00040.txt.bz2 Hello I'm having some trouble with pthreads-win and sockets, wondering if anyone can help. I have a test setup with a loop which iterates a number of times. Inside the loop, I create a thread on which I run an SSL server socket. After the thread is created, I connect an SSL Client socket to the server socket, then disconnect it, disconnect the server socket, and issue a pthread_join. Using this setup (one thread created with pthread_create at any time), I cannot create anymore threads after 10-15 such iterations (in rare cases - say if I run a 200-iteration loop, I might be able to create threads again once I reach iteration 50 or so). I believe this to be an issue with my SSL client socket implementation, because everything works well if I don't connect a client socket during the iteration. It also works well if I use a non-SSL server/client socket. However, I thought I'd ask here: is there any reason why pthread_create would return EAGAIN in such a setup? The handle count varies very slightly during the iterations but does not increase over the run time. The memory does increase due to my test setup, but at the maximum peak it is no where near close to using up all system resources. Can it be some sort of problem with the release of the socket (win sockets are not guaranteed to be released as soon as closesocket returns) ? Thank you in advance, Laura