This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: 1.5.9-1: socket() appears NOT to be thread-safe
- From: Brian Ford <ford at vss dot fsi dot com>
- To: Enzo Michelangeli <em at em dot no-ip dot com>
- Cc: cygwin at cygwin dot com
- Date: Wed, 14 Apr 2004 12:05:59 -0500 (CDT)
- Subject: Re: 1.5.9-1: socket() appears NOT to be thread-safe
- References: <00c901c4220d$47f6eaa0$0200a8c0@em.noip.com>
- Reply-to: cygwin at cygwin dot com
On Wed, 14 Apr 2004, Enzo Michelangeli wrote:
> While porting to Cygwin the Linux application "sipd"
> (http://www.sxdesign.com/index.php?page=developer&submnu=sipd ), which
> uses pthreads, I noticed that socket() calls issued concurrently by
> several threads often failed, with strerror(errno) saying "operation not
> permitted". Once I protected all the calls with mutex locks, such errors
> went away. Is Cygwin's implementation of socket() known to be
> thread-unsafe?
FWIW, I have seen this symptom as well, primarily on a dual CPU,
Hyperthreaded XP box under 1.5.[8|9]+. In fact, I just confirmed it
still exists in a current CVS build from this morning.
It seems like a race condition. Running under strace fixes it, so it has
been difficult to isolate. If I have time, I'll try to look at it again
soon. Would you like to work on it together?
--
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax: 314-551-8444
--
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/