Re: Crash with FD_SET when there are more than 1024 open files
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=haller-berlin.de; s=mail_2009081900; h=Message-ID:Date:From:Subject:In-Reply-To:To; bh=eJzMa73aJF+TG6zUYf0tcxCt5U5Ggddaqc/3L4VVm5I=; b=ZYo5lTM+BbRgW0k+jh9sZBUIPADSZK6T05+Zj43SsSBe/+1aNhV+DNQb6rfujMwmqxCayfFahacB3063IwmZQg4c59vw9FZDqMbkUTiVbb0iJve6GiyZ+e1YfLz1dDZs07t/lT3LFL/Uz6TtGEuKZ52cyL9tXzNAqfjn2Zpm3D0=; User-agent: MacSOUP/2.8.3 (Mac OS X version 10.6.3 (x86)) Stuart Smith <stuart@elgato.com> wrote:
We are investigating a reproducible crash that happens in Bonjour code when we have many files open. The crash happens in DNSServiceProcessResult (part of mDNSResponder), which contains the following code:
It seems you have a few alternatives: recompile with a larger value for FD_SETSIZE check that sd+1 is <= FD_SETSIZE before calling select(), although that isn't particularly helpful.... use poll() instead of select()
Sigh; it seems I completely failed to make myself clear. Let me try again: The code I posted is not my code; if it was, I would know how to make it work. The code is in mDNSResponder which is part of Mac OS. I'm not even actively calling this code. All I'm doing is opening an NSSavePanel; this causes the offending code to run (presumably in order to populate the save panel's side bar with file servers). This seems to be outside of my control. I consider this a bug in Apple's code, and I reported it as such. My concern, however, is that other, similar code might be running in my process over which I have no control either. For example in other parts of Mac OS, or as part of plugins that my application loads. Also, for this particular bug it's not sufficiant for us to wait until Apple fixes it in a future 10.6.x update. Many of our users are still running 10.5 and don't want to upgrade. So I'm looking for ways to protect against this, for example by making sure that there are always enough small file descriptors available. -- Stefan Haller Berlin, Germany http://www.haller-berlin.de/ _______________________________________________ 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
participants (1)
-
lists@haller-berlin.de