--nextPart4551172.ffsmkDH9LH
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Friday 16 June 2006 17:23, Perrin Harkins wrote:
> Dave Rolsky wrote:
> > Apache::SizeLimit has a long-standing bug on Linux where it never
> > actually kills a child, because of Perl's caching of ppid info
> > internally, and the way this interacts with Apache's forking.
> >
> > See this thread for details:
> > http://mail-archives.apache.org/mod_...05.mbox/%3C51=

EE
> >FE1ECF72D811B384000E7F228BB7024CC6BC@DEBAGE71.BERT ELSMANN.DE%3E

>
> You're saying that it always thinks it is in the main process even
> though it's actually in a child? =A0I haven't seen this behavior. =A0Is it
> specific to certain versions of Perl or Linux?


Yes, since 5.8.1. The problem is that the now old linux-threads implementat=
ion=20
returns different values for getpid() and getppid() for different threads.=
=20
Hence Perl decides better to cache these values and update the cache on=20
fork() to make it more compatible with other thread implementations. Since=
=20
Apache does its own fork the cache is not updated. Mp2 contains code that=20
handles the situation but mp1 does not.

=46or more information see also

http://www.gossamer-threads.com/list...porters/193162
http://www.gossamer-threads.com/list...porters/175806

Dave, have you tried the proposed approach from the thread you mentioned?

> PerlModule Perl::AfterFork
> PerlModule Apache::Constants
> PerlInitHandler "sub {Perl::AfterFork::reinit(); return Apache::OK;}"
>=20
> or
>=20
> PerlModule Perl::AfterFork
> PerlInitHandler "sub {Perl::AfterFork::reinit();}"


If you are working on Apache::SizeLimit maybe you could incorporate also=20
Linux::Smaps for newer kernels. Also the problem of counting out of core=20
pages could be addressed at least in the docs, see

http://www.gossamer-threads.com/lists/modperl/dev/84375

Torsten

--nextPart4551172.ffsmkDH9LH
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBEkuWKwicyCTir8T4RAkRAAKCNNFFS4gDZ4bawfFIpBj TiyBzlXwCgwo7x
Tn0aKWg4XfeWswPavOOQlzU=
=izkl
-----END PGP SIGNATURE-----

--nextPart4551172.ffsmkDH9LH--