[Resend with correct sender address] From: Brooks Davis <[email protected]> Date: Fri, 11 Dec 2009 13:31:22 -0600 To: Carlo Marcelo Arenas Belon <[email protected]> Cc: Brad Nicholes <[email protected]>, [email protected] Subject: Re: [Ganglia-developers] [RFC] two step gmond initialization
On Fri, Dec 11, 2009 at 04:56:51PM +0000, Carlo Marcelo Arenas Belon wrote: > On Fri, Dec 11, 2009 at 08:59:56AM -0700, Brad Nicholes wrote: > > Why are we having these problems when httpd doesn't? Is the real solution > > as simple as going to the APR mailing list and asking why this issue exists > > in APR and if there is a workaround? I haven't really seen this issue show > > up on the APR mailing list so far or did I miss it? > > it is obvious, as you explained before, that apache uses APR in a different > way than ganglia and that is why there is no "bug" to fix here in APR (except > the fact that the implementation of apr_poll is "leaky" as it is inconsistent > between platforms), if there is a bug I would say it is in the BSD > implementation of kqueue with its non inheritable file handles. I'd tend to argue that this is a documentation bug in ARP. The API needs to specify the constraints under which it can be used and in this case that means you can't assume that you can fork and then use a pollset created before the fork. This is not appreciably different than the fact that only a tiny set of POSIX interfaces are allowed to be used in the child of a forked, threaded process. The problem is that the APR documentation doesn't seem to include this information. > I presume the reason why you haven't seen this show up in the APR list, is > because it makes probably more sense for the apache httpd list instead for > help understanding how apache is able to "work around" the leakiness of > apr_poll and that also requires some reading from apache's code (which I > am not at least that familiar with, neither really interested) Looking at the prefork mpm, the pollsets are created and used only in child_main() and thus are created after the fork. I suspect that changing the ganglia code to open all the sockets, but defer creation of the pollset until after fork is the right way to go. -- Brooks ----- End forwarded message -----
pgptNewC0hH1m.pgp
Description: PGP signature
------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev
_______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
