Skip Menu |
 

This queue is for tickets about the Text-Template CPAN distribution.

Report information
The Basics
Id: 22031
Status: resolved
Priority: 0/
Queue: Text-Template

People
Owner: Nobody in particular
Requestors: radu [...] yx.ro
Cc:
AdminCc:

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



Subject: _scrubpkg still leaks memory
Date: Wed, 11 Oct 2006 18:08:20 +0300
To: bug-Text-Template [...] rt.cpan.org
From: Radu Greab <radu [...] yx.ro>
Download (untitled) / with headers
text/plain 1.2k
In Text::Template 0.44 _scrubpkg is still causing memory leaks in long running processes. The generated package is not cleared and the package is not removed from the symbol table of Text::Template. The change below has fixed this problem for me. diff -Naur Text-Template-1.44.orig/lib/Text/Template.pm Text-Template-1.44/lib/Text/Template.pm --- Text-Template-1.44.orig/lib/Text/Template.pm 2003-04-29 23:24:30.000000000 +0300 +++ Text-Template-1.44/lib/Text/Template.pm 2006-07-01 05:03:54.000000000 +0300 @@ -428,6 +428,8 @@ foreach my $key (keys %$hash) { undef $hash->{$key}; } + %$hash = (); + delete $Text::Template::{$s."::"}; } } diff -Naur Text-Template-1.44.orig/t/01-basic.t Text-Template-1.44/t/01-basic.t --- Text-Template-1.44.orig/t/01-basic.t 2003-04-29 23:13:10.000000000 +0300 +++ Text-Template-1.44/t/01-basic.t 2006-07-01 05:04:24.000000000 +0300 @@ -245,7 +245,9 @@ # (31) Test _scrubpkg for leakiness $Text::Template::GEN0::test = 1; Text::Template::_scrubpkg('Text::Template::GEN0'); -if ($Text::Template::GEN0::test) { +if ($Text::Template::GEN0::test + || exists $Text::Template::GEN0::{test} + || exists $Text::Template::{'GEN0::'}) { print "not ok $n\n"; } else { print "ok $n\n";
Download (untitled) / with headers
text/plain 1.4k
this is fixed in debian http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609528 On Wed Oct 11 11:08:38 2006, radu@yx.ro wrote: Show quoted text
> > In Text::Template 0.44 _scrubpkg is still causing memory leaks in long > running processes. The generated package is not cleared and the > package > is not removed from the symbol table of Text::Template. > > The change below has fixed this problem for me. > > > diff -Naur Text-Template-1.44.orig/lib/Text/Template.pm Text-Template- > 1.44/lib/Text/Template.pm > --- Text-Template-1.44.orig/lib/Text/Template.pm 2003-04-29 > 23:24:30.000000000 +0300 > +++ Text-Template-1.44/lib/Text/Template.pm 2006-07-01 > 05:03:54.000000000 +0300 > @@ -428,6 +428,8 @@ > foreach my $key (keys %$hash) { > undef $hash->{$key}; > } > + %$hash = (); > + delete $Text::Template::{$s."::"}; > } > } > > diff -Naur Text-Template-1.44.orig/t/01-basic.t Text-Template- > 1.44/t/01-basic.t > --- Text-Template-1.44.orig/t/01-basic.t 2003-04-29 23:13:10.000000000 > +0300 > +++ Text-Template-1.44/t/01-basic.t 2006-07-01 05:04:24.000000000 > +0300 > @@ -245,7 +245,9 @@ > # (31) Test _scrubpkg for leakiness > $Text::Template::GEN0::test = 1; > Text::Template::_scrubpkg('Text::Template::GEN0'); > -if ($Text::Template::GEN0::test) { > +if ($Text::Template::GEN0::test > + || exists $Text::Template::GEN0::{test} > + || exists $Text::Template::{'GEN0::'}) { > print "not ok $n\n"; > } else { > print "ok $n\n";
Download (untitled) / with headers
text/plain 110b
Still broken in 1.45... Patched submitted for FreeBSD... http://www.freebsd.org/cgi/query-pr.cgi?pr=166198
Download (untitled) / with headers
text/plain 125b
This is still broken in 1.46. Got bit by this hard last week. Long running app chewing up gigabytes of RAM due to this bug.
Subject: Re: [rt.cpan.org #22031] _scrubpkg still leaks memory
Date: Mon, 22 Jun 2015 19:53:43 +0000
To: bug-Text-Template [...] rt.cpan.org
From: Mark Dominus <mjd [...] plover.com>
Download (untitled) / with headers
text/plain 365b
Show quoted text
> Queue: Text-Template > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=22031 > > > This is still broken in 1.46. Got bit by this hard last week. Long > running app chewing up gigabytes of RAM due to this bug.
I am really sorry this has lain dormant for so long. I will see about fixing the memory leak when I return from vacation next week.
Download (untitled) / with headers
text/plain 101b
Gentle reminder. Any chance we can get a release with the patch applied? -- Regards, Michael Schout
Download (untitled) / with headers
text/plain 167b
Hey MJD I'm willing to take COMAINT if you do not have the time to patch this issue. Would really like to see this memory leak fixed ;). -- Regards, Michael Schout
Subject: Re: [rt.cpan.org #22031] _scrubpkg still leaks memory
Date: Wed, 15 Feb 2017 00:30:03 +0000
To: bug-Text-Template [...] rt.cpan.org
From: Mark Dominus <mjd [...] plover.com>
Show quoted text
> I'm willing to take COMAINT if you do not have the time to patch this issue.
It is done.
Download (untitled) / with headers
text/plain 232b
On Tue Feb 14 19:36:52 2017, mjd@plover.com wrote: Show quoted text
>
> > I'm willing to take COMAINT if you do not have the time to patch this > > issue.
> > It is done.
Thanks! I'll release a patched version shortly! -- Regards, Michael Schout
Finally fixed, in v1.47 which was just uploaded to CPAN. Thanks! -- Regards, Michael Schout


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.