From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7188 invoked by alias); 10 Jun 2004 17:06:43 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 7134 invoked from network); 10 Jun 2004 17:06:41 -0000 Received: from unknown (HELO esds.vss.fsi.com) (66.136.174.212) by sourceware.org with SMTP; 10 Jun 2004 17:06:41 -0000 Received: from fordpc.vss.fsi.com (fordpc [198.51.27.93]) by esds.vss.fsi.com (8.11.6+Sun/8.9.1) with ESMTP id i5AH6b811541 for ; Thu, 10 Jun 2004 12:06:37 -0500 (CDT) Date: Thu, 10 Jun 2004 17:37:00 -0000 From: Brian Ford Reply-To: cygwin@cygwin.com To: cygwin@cygwin.com Subject: Re: 1.5.9-1: socket() appears NOT to be thread-safe In-Reply-To: Message-ID: References: <20040415174118.GA8644@coe.bosbc.com> <20040522005123.GB14563@coe.bosbc.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2004-06/txt/msg00416.txt.bz2 On Thu, 10 Jun 2004, Brian Ford wrote: > I put a call to try_to_debug in find_winsock_errno when it returned the > default EPERM. Then, by setting > CYGWIN="error_start=c:\cygwin\bin\gdb.exe" I can get a gdb pop up and do a > back trace. The error was: > > 10093 > Either the application has not called WSAStartup, or WSAStartup failed. > > and came from the socket call in cygwin_socket. > > So, given this is some sort of race condition, how do I debug the autoload > code and find out if WSAStartup was actually called or if it failed? Ok, I put another try_to_debug call in wsock_init just inside the if (!wsock_started). Sometimes I hit it first and the socket call succeeds. But, sometimes I hit the one above first and the socket call fails. In the later case, wsock_started=1. Any idea how that could happen? -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International the best safety device in any aircraft is a well-trained pilot... -- 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/