You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Fred Moyer <fr...@redhotpenguin.com> on 2010/02/02 23:19:49 UTC

Re: [mp2] Apache2::SizeLimit should be using $s->rss, not $s->size for Linux::Smaps

Can you submit these patches inline?

http://perl.apache.org/docs/2.0/devel/help/help.html#Submitting_Patches

When they are attachments like this, people tend to not read them.
Whereas when they are inline, people tend to be able to read them and
comment very easily.

On Tue, Feb 2, 2010 at 1:58 PM, Max Kanat-Alexander <mk...@bugzilla.org> wrote:
>        All of my processes kept exiting with a report that they had a 300M
> unshared size, which was clearly untrue, even from looking at top. After
> some investigation, I discovered that Apache2::SizeLimit was calling
> $s->size on the Linux::Smaps object, when instead it should be returning
> $s->rss as the process size.
>
>        Attached is a one-line patch to fix the issue.
>
>        Also, if you're interested in proof that this is right, I've attached a
> short .cgi file that you can load under mod_perl, with Linux::Smaps
> installed, to see process sizes and the return values of all of the
> Smaps accessors.
>
>        -Max
> --
> http://www.everythingsolved.com/
> Competent, Friendly Bugzilla and Perl Services. Everything Else, too.
>

Re: [mp2] Apache2::SizeLimit should be using $s->rss, not $s->size for Linux::Smaps

Posted by Fred Moyer <fr...@redhotpenguin.com>.
On Wed, Feb 9, 2011 at 5:42 PM, Fred Moyer <fr...@redhotpenguin.com> wrote:
> On Wed, Feb 9, 2011 at 5:24 PM, Max Kanat-Alexander <mk...@bugzilla.org> wrote:
>> On 02/02/2010 02:19 PM, Fred Moyer wrote:
>>> Can you submit these patches inline?
>>
>>        Here is the patch inline:
>
> Thanks - expect 0.96 in the next day.

Actually, I haven't had enough time to review this - thought it was a
different issue.

Can you add a test case?  I think Torsten had some concerns about the
change, and I don't have enough tuits right now to spend an hour or
two making sure this is right.

>
>>
>> Index: lib/Apache/SizeLimit/Core.pm
>> ===================================================================
>> --- lib/Apache/SizeLimit/Core.pm        (revision 905815)
>> +++ lib/Apache/SizeLimit/Core.pm        (working copy)
>> @@ -175,7 +175,7 @@
>>     return $class->_linux_size_check() unless $USE_SMAPS;
>>
>>     my $s = Linux::Smaps->new($$)->all;
>> -    return ($s->size, $s->shared_clean + $s->shared_dirty);
>> +    return ($s->rss, $s->shared_clean + $s->shared_dirty);
>>  }
>>
>>  sub _linux_size_check {
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] Apache2::SizeLimit should be using $s->rss, not $s->size for Linux::Smaps

Posted by Fred Moyer <fr...@redhotpenguin.com>.
On Wed, Feb 9, 2011 at 5:24 PM, Max Kanat-Alexander <mk...@bugzilla.org> wrote:
> On 02/02/2010 02:19 PM, Fred Moyer wrote:
>> Can you submit these patches inline?
>
>        Here is the patch inline:

Thanks - expect 0.96 in the next day.

>
> Index: lib/Apache/SizeLimit/Core.pm
> ===================================================================
> --- lib/Apache/SizeLimit/Core.pm        (revision 905815)
> +++ lib/Apache/SizeLimit/Core.pm        (working copy)
> @@ -175,7 +175,7 @@
>     return $class->_linux_size_check() unless $USE_SMAPS;
>
>     my $s = Linux::Smaps->new($$)->all;
> -    return ($s->size, $s->shared_clean + $s->shared_dirty);
> +    return ($s->rss, $s->shared_clean + $s->shared_dirty);
>  }
>
>  sub _linux_size_check {
>

Re: [mp2] Apache2::SizeLimit should be using $s->rss, not $s->size for Linux::Smaps

Posted by Fred Moyer <fr...@redhotpenguin.com>.
On Wed, Feb 9, 2011 at 5:24 PM, Max Kanat-Alexander <mk...@bugzilla.org> wrote:
> On 02/02/2010 02:19 PM, Fred Moyer wrote:
>> Can you submit these patches inline?
>
>        Here is the patch inline:

Thanks - expect 0.96 in the next day.

>
> Index: lib/Apache/SizeLimit/Core.pm
> ===================================================================
> --- lib/Apache/SizeLimit/Core.pm        (revision 905815)
> +++ lib/Apache/SizeLimit/Core.pm        (working copy)
> @@ -175,7 +175,7 @@
>     return $class->_linux_size_check() unless $USE_SMAPS;
>
>     my $s = Linux::Smaps->new($$)->all;
> -    return ($s->size, $s->shared_clean + $s->shared_dirty);
> +    return ($s->rss, $s->shared_clean + $s->shared_dirty);
>  }
>
>  sub _linux_size_check {
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: [mp2] Apache2::SizeLimit should be using $s->rss, not $s->size for Linux::Smaps

Posted by Max Kanat-Alexander <mk...@bugzilla.org>.
On 02/02/2010 02:19 PM, Fred Moyer wrote:
> Can you submit these patches inline?

	Here is the patch inline:

Index: lib/Apache/SizeLimit/Core.pm
===================================================================
--- lib/Apache/SizeLimit/Core.pm	(revision 905815)
+++ lib/Apache/SizeLimit/Core.pm	(working copy)
@@ -175,7 +175,7 @@
     return $class->_linux_size_check() unless $USE_SMAPS;

     my $s = Linux::Smaps->new($$)->all;
-    return ($s->size, $s->shared_clean + $s->shared_dirty);
+    return ($s->rss, $s->shared_clean + $s->shared_dirty);
 }

 sub _linux_size_check {