site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 On 14 Jul 2010, at 22:49, Mo McRoberts wrote: On 14-Jul-2010, at 22:44, Norm Green wrote: Hi, 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... As I said in my post, the process is in start-up when I get the error, so I'm confident I don't have a leak at this point. Do I need to call sem_close() even if the process terminates? On 7/14/10 3:33 PM, Alastair Houghton wrote: 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? This email sent to site_archiver@lists.apple.com