This is the mail archive of the
cygwin
mailing list for the Cygwin project.
semget() returns EAGAIN?
- From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin" <cygwin at cygwin dot com>
- To: "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Date: Wed, 7 Aug 2019 05:02:22 +0000
- Subject: semget() returns EAGAIN?
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ncbi.nlm.nih.gov; dmarc=pass action=none header.from=ncbi.nlm.nih.gov; dkim=pass header.d=ncbi.nlm.nih.gov; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SJyF/EFs7Bpho0NLgghrz1fImQnjrt52qQ8FHfi69Og=; b=LE9Mf8UC8lo0puQZRjGq2vs9oinXqyLkMY7QDFl/rp1mfjh0oto9gHW+lzmbssO75qONtwOsuh4G2psfCqTAfplSazzNQh87uUTn/fpK1dK7NsUwK09l36SXky0JxJhykdUhZsUHcm/ltfRI7n6eGU1Q0zJ50ZL3oIF7+rpHjCALN+9wML7vrycYNqUXVZ48EBkL9SbOGn1eSTDOWX9FXV8XL4BzN4fY080Oh68/erKelVF8suQ4rkJEbFgoUdciNn+P9KK8TAxc/Wm4Vkx3h6Kc7WPwffsVF/M6oKFZeFyX8JMO1OfGwHBuQZyheERkR7KDo1ifyQWNc6Jza5xN4g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hjku0o2UpqDdxoP3Qvgfore3qp/Hzkj0ahd98IpsyqJzI/d/vsKeBlEtNGL/vf/0bsJd088L7jQLmCPkd6FCrCebm3YdKe3StoRINDMMiZKP8HbHFLVVJG7RLoob2tOfpJ2MenmuNRfrWlOxcZeip5rMrwr9Huf6ByXScNNNTCkSsFjNTO+flwhW9K/rmhO00pAmrTIzI4SKFjgbPwzj3IkcL9rZbggO7RKMritB6HefXZq5734x38LjoeDOg7lBbLhfEM+sCfBvCxCQfPe5e1auHNG8aErryKGEApalhsKBqlq+3ZC71KN+cAKRUGAkvN3YxjUwwaWsI6ok1F80Pg==
- Ironport-sdr: 3JgA3VuyeCKCRsQWgdBn12pEY6XrG+OQ11WWcGkKUYEU3wyIFkkRX7gFTT2dLeg+o3ak5KIzYW R+UKNgOOOrlA==
- Reply-to: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" <lavr at ncbi dot nlm dot nih dot gov>
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).
EAGAIN is not documented in any of semget() API documentation that I can find.
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?
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple