Re: Memory leak on reload when the 'Pg' driver is preloaded
-----BEGIN PGP SIGNED MESSAGE-----
> OK, it gets weirder. The following script produces the leak. If I
> comment out the install_driver line, I get a big old segfault! Same
> if I comment out the Apache::DBI line in addition. This works with
> plain apache, or apache-ssl.
> use strict;
> use Apache::Status ();
> use Apache::DBI ();
> 1; #return true value
I looked into it with the following setup:
There was a Test.pm module handling all requests for /. It opened a
connection to the database and fetched a couple of rows.
With DBI->install_driver('Pg'), the Apache processes stayed at 8.4 MB. I
bombarded the Apache with ApacheBench and multiple SIGUSR1 but I found
no memory leaks. The process sizes did not change.
> If I comment it all out including the Apache::Status line, I get
> neither the segfault or the leak. (Well, small leak, a few bytes).
Without the install_driver() in place, everything worked as well. The
Apache processes stayed at near 6 MB. No segfaults. No problems.
> So the install_driver masks a bigger problem with Apache::Status?
> That's just too weird. But true, I swear.
> Is there anyone else out there with Debian stable w/
> apache+libapache-mod-perl who can try to reproduce this simple case?
> I'd really like either a confirmation or a counterexample. If the
> latter, I'd chalk it up to a weirdness on my system (and probably not
> even pursue it, since I've moved on to the static version). I'm
> pursuing it this far so Dan J. might get some useful feedback.
I'm pretty tired at the moment, so there might have been something I
mislooked. I'll give it another look tomorrow. At work, where I don't
have any distractions :)
It's pretty odd, in my view, that the Apache processes which did not
preload the Pg driver were smaller.
Keith, could you post results to modperl list if people at debian-isp
come to a different (or to the same) solution. I'm not subscribed to
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----