Re: Memory leak on reload when the 'Pg' driver is preloaded
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> 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.
>
> #!/usr/bin/perl
> use strict;
> use Apache::Status ();
> use Apache::DBI ();
> DBI->install_driver('Pg');
> 1; #return true value
I looked into it with the following setup:
apache 1.3.26-0woody1
libapache-mod-perl 1.27-2
postgresql 7.2.1-2woody2
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
the list.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9rxEXnksV4Ys/z5gRAqlBAJ9xKgkCmCxsg8huo/C1N0uk2XKSowCgoCdr
FdyuRGCkZvDifk5fyqfOcdo=
=im3K
-----END PGP SIGNATURE-----
Reply to: