Skip Menu |

This queue is for tickets about the Process-MaxSize CPAN distribution.

Report information
The Basics
Id: 95397
Status: resolved
Priority: 0/
Queue: Process-MaxSize

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.03
Fixed in: (no value)



Subject: Test suite fails with perl 5.19.x (COW related?)
The test suite fails for bleadperl. See http://matrix.cpantesters.org/?dist=Process-MaxSize-0.03 for an overview and http://www.cpantesters.org/cpan/report/dde35ec6-ed01-11e2-ac17-70a6f1ff63fb for a sample report. Maybe the problem happens because COW (copy on write) is now in effect in perl. and you have to find another method to "eat" memory. Regards, Slaven
On 2014-05-06 01:49:38, SREZIC wrote: Show quoted text
> The test suite fails for bleadperl. See > http://matrix.cpantesters.org/?dist=Process-MaxSize-0.03 for an > overview and http://www.cpantesters.org/cpan/report/dde35ec6-ed01- > 11e2-ac17-70a6f1ff63fb for a sample report. > > Maybe the problem happens because COW (copy on write) is now in effect > in perl. and you have to find another method to "eat" memory.
This seems to be enough to disable COW: diff --git i/t/001Basic.t w/t/001Basic.t index fe12c3b..f2865d8 100644 --- i/t/001Basic.t +++ w/t/001Basic.t @@ -42,7 +42,7 @@ $p->check(); is($restarted, 0, "Not yet restarted"); for(1..5) { - push @arr, $mega; + push @arr, $_.$mega; $p->check(); }
On Tue May 06 01:52:59 2014, SREZIC wrote: Show quoted text
> This seems to be enough to disable COW: > - push @arr, $mega; > + push @arr, $_.$mega;
Nice trick, what's the reason it's disabling COW, and is it going to stay this way going forward with new perl releases, or is there a variable for the test suite to set to disable cow reliably?
On Wed May 07 00:32:11 2014, MSCHILLI wrote: Show quoted text
> On Tue May 06 01:52:59 2014, SREZIC wrote:
> > This seems to be enough to disable COW: > > - push @arr, $mega; > > + push @arr, $_.$mega;
> > Nice trick, what's the reason it's disabling COW, and is it going to > stay this way going forward with new perl releases, or is there a > variable for the test suite to set to disable cow reliably?
It's disabling COW because "1somebigstring" is a different string to "2somebigstring". Right now, even doing: push @arr, "".$mega; allows the tests to pass, but I wouldn't rely on that - concatenation of an empty string might be optimized in the future. Tony
Thanks for that, I've added Slaven's patch: https://github.com/mschilli/process-maxsize-perl/commit/93723cec2bf5785c944e0bc2e235315b8f484798 and released Process::MaxSize 0.04 to CPAN. Thanks everyone!