delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/08/07/04:21:03

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=D0mmAwEnl4ijmzlanjXXGR4le7gqsCqqISgwP3yEp99W5Abc8fsO9
gKpsBDPTnCJTUHYVuaSV0CMMhZEbgW5N5zPkyYmVry7KGawqcr81YBPY6uR6EgUy
tFUDrK5SoXf6VAW7bBq3MD3DtbVfonYAuNEJgwVz0mMShdrNNDdEaI=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=O0x8R22vHS6rOd6SIxsnMoBHCP8=; b=fx2EzEUcN+se98uNxoU/js0DHrNv
5lm41UtAGVH3NxUVjbM/UYpaRXGHpAPfrvcOpzOkTeWDop26d3iuB+RKNIcoCZ7n
JoU3+NR9BjLfM7+DyS1E40BoJ/jCuPFFj2yZchQYpqybwUVX35rRxMrKf782oNw/
inaM1tohKYCJMF0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-103.9 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1274
X-HELO: mout.kundenserver.de
Date: Wed, 7 Aug 2019 10:20:10 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: semget() returns EAGAIN?
Message-ID: <20190807082010.GZ11632@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <BL0PR0901MB4308D3780798A4941BF944AAA5D40 AT BL0PR0901MB4308 DOT namprd09 DOT prod DOT outlook DOT com> <20190807081242 DOT GY11632 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20190807081242.GY11632@calimero.vinschen.de>
User-Agent: Mutt/1.11.3 (2019-02-01)

--rdeY6f/ml8+xnc5C
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Aug  7 10:12, Corinna Vinschen wrote:
> On Aug  7 05:02, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote:
> > I'm noticing that in a high-contention situation (many processes try
> > to get ahold of a semaphore) semget() on Cygwin starts to return
> > EAGAIN (try again) after about 62 processes has gotten to call
> > semget() and are actively competing for the semaphore (i.e. using the
> > semaphore ID semget() returned to them).
> >=20
> > EAGAIN is not documented in any of semget() API documentation that I
> > can find.
> >=20
> > I understand that in Cygwin semget() is implemented as a connection to
> > cygserver, and the error probably stems from there, but I don't think
> > that such a code is appropriate as a final errno.  And why is there a
> > limit, to begin with?  What exactly imposes it?
>=20
> The number of parallel open pipes, for instance.  By default, 10
> worker threads handle the load and up to 62 processes can be handled
> in parallel.  If the numbers are too low in your scenario, try to
> raise them in /etc/cygserver.conf.

Apart from that, the preferred way to use semaphores is to use POSIX
semaphores, that is, sem_open and friends.  These don't require
cygserver.


Corinna

--=20
Corinna Vinschen
Cygwin Maintainer

--rdeY6f/ml8+xnc5C
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1KiboACgkQ9TYGna5E
T6DeqA/5AbzAwaJOSSu/CjYcPFa1lTpEIoNYc5BYZj3lBoECwii0qM1SJwDeOk5G
xTihhsfIH+Qa1/7y3qsEJp/2CHp5MtZSzz2ITVK4CE3AkiHhe/s7stNUKekshOlI
l1SdqlQJfhqLuovqpXHjmajkPArH5Zf8zxxh07zltL116Bod1Fs+PnnOJesd0gSt
Ga/nov8ooWFQyMM7LnUUYxbdBbojbSszxHAhMTw/ZGCVcW3zKDlUnLMHVCKFE27+
OfyKtuYz7UFLyr/MxVJhxaVxWU9IGILsFiR8t1CUn7PuKcGYmvEgthBXZzp89E/+
7JaJ2hcv2Yqtg4irmzVjQ6i4k2abuOymB9JCpvMtyeoosgG7HvlJRlHnWa6e/4nx
/vXYJZRFQkACdB2xN34dGcuee0DksS8renrYrxqOt9V/HmbkZZDl+hteFp6keKHA
wCLAfJ/fTTG2v/9kcWQiIgu8+JuouYBT789+u7KdsF13IKVnIP2NE7/QMljvXjsV
+JdIQ/Fxs95yghqQB2thakIj0KeX4/G04z2jlhEd3lSUwHB9YZAmnzG0vioAzaIK
QNIq84P3oqek31hnpEO8CxjHHIqnx9SCaOQ97omwy/E7jpdGQxdm/z6WVOBqSiRY
v3u0CZh8Oa1T+HcCbDncrY5fL44GzgjJkJXKWs6vVo0+2WrFIQw=
=q/4t
-----END PGP SIGNATURE-----

--rdeY6f/ml8+xnc5C--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019