site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=coriolis-systems.com; h= subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=aug07; bh=YOOoZxf7lWP9xSJuC5YCSA+T2po=; b=nwLGi03PkIgkCvwJtN7x9EOzMrGA 0YqKn7k2mC7Ey8d7U2awmH+uBaJRUuRoG3g7Q/wQbcAxV6d2AbVEfBchHVNvnKvN vG3FTeFQZI6SIALgmcSGhBSppurOstLeJt4+PkY/ymrq+IA2Xj+Oxc3ceWTD8cwY 4JWDexmtci19D/o= On 14 Jul 2010, at 22:49, Mo McRoberts wrote:
On 14-Jul-2010, at 22:44, Norm Green wrote:
Hi,
We have a problem where sem_open() returns ENOSPC. This occurs during program startup and repeats until we reboot the machine. Then it goes away for awhile but eventually returns until we reboot the machine again. Is there a better solution than restarting the machine?
I'm guessing you've already run 'ipcs' when this problem occurs, and it's not listing lots of semaphores?
ipcs only lists SysV semaphores, whereas the OP is using POSIX semaphores (so it won't help). I'm not sure that there is any equivalent for POSIX semaphores (which is a bit of a shame, actually). Anyway, I agree with your implied diagnosis; the kernel will return ENOSPC if you allocate more than posix_sem_max (default 10,000, configurable via sysctl as kern.posix.sem.max) semaphores. Most likely the OP is leaking semaphores somehow (possibly some sem_close() and sem_unlink() calls are needed somewhere?) Kind regards, Alastair. -- http://alastairs-place.net _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com