public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Ford <ford@vss.fsi.com>
To: Enzo Michelangeli <em@em.no-ip.com>
Cc: cygwin@cygwin.com
Subject: Re: 1.5.9-1: socket() appears NOT to be thread-safe
Date: Wed, 14 Apr 2004 17:06:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.58.0404141157150.21704@thing1-200> (raw)
In-Reply-To: <00c901c4220d$47f6eaa0$0200a8c0@em.noip.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/

  parent reply	other threads:[~2004-04-14 17:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-14 10:43 Enzo Michelangeli
2004-04-14 13:22 ` Corinna Vinschen
2004-04-14 17:06 ` Brian Ford [this message]
2004-04-15  3:17   ` Enzo Michelangeli
2004-04-15  4:14     ` Christopher Faylor
2004-04-15 17:41       ` Christopher Faylor
2004-05-22 16:59         ` Brian Ford
2004-05-22 19:08           ` Christopher Faylor
2004-06-10 15:21             ` Brian Ford
2004-06-10 17:37               ` Brian Ford
2004-04-15  4:04 Enzo Michelangeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.58.0404141157150.21704@thing1-200 \
    --to=ford@vss.fsi.com \
    --cc=cygwin@cygwin.com \
    --cc=em@em.no-ip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).