On Saturday 06 October 2007 03:52, Max Kanat-Alexander wrote: > I have an x86_64 machine running RHEL5 but with the mod_perl > 2.0.3 from Fedora 7. > > Without Linux::Smaps installed, Apache2::SizeLimit thinks my > processes are taking up 300MB and terminates them after every hit. > ("top" thinks so too, but "free -m" quickly proves that's untrue.) > > With Linux::Smaps, Apache2::SizeLimit simply doesn't work at > all, because Linux::Smaps apparently doesn't work under x86_64. > > See this RT bug I filed against Linux::Smaps: > > http://rt.cpan.org//Ticket/Display.html?id=29803 > > I do have a kernel that supports smaps, 2.6.18.
Linux::Smaps simply analyzes /proc/$PID/smaps. It was initially written on a 32bit system. Looking at your bug report I assume the hex() function doesn't work for 64bit hex values. Can you show us the output of /proc/$PID/smaps of one of your apache processes? Is your perl compiled with 64bit support? Assuming the latter this patch may work for you. Otherwise you'll get an integer overflow. --- lib/Linux/Smaps.pm~ 2005-09-23 20:55:12.000000000 +0200 +++ lib/Linux/Smaps.pm 2007-10-07 12:13:06.000000000 +0200 @@ -2,7 +2,7 @@ use 5.008; use strict; -no warnings qw(uninitialized); +no warnings qw(uninitialized portable); use Class::Member::HASH qw{pid lasterror _elem -CLASS_MEMBERS}; Please let me know if it works. Torsten
pgpN0gZjGSJ1e.pgp
Description: PGP signature