Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1062576 - memory leak when including a file with "use utf8"
Summary: memory leak when including a file with "use utf8"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl
Version: 22
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jitka Plesnikova
QA Contact: Fedora Extras Quality Assurance
URL: https://rt.perl.org/Public/Bug/Displa...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-07 11:04 UTC by lav
Modified: 2015-10-04 23:20 UTC (History)
9 users (show)

Fixed In Version: 5.20.3-327.fc22 perl-5.18.4-310.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1063330 (view as bug list)
Environment:
Last Closed: 2015-10-04 23:20:34 UTC


Attachments (Terms of Use)
Fix for perl-5.20 (deleted)
2015-08-26 11:52 UTC, Petr Pisar
no flags Details | Diff

Description lav 2014-02-07 11:04:55 UTC
Description of problem:
Every time perl includes a file with "use utf8" and text constants it leaks memory.


Version-Release number of selected component (if applicable):
perl-5.16.3-266.fc19.x86_64

How reproducible:
always

Steps to Reproduce:
1. run the test program below
2. watch as memory usage grows

Here is the test program:
-------------------------
my $mem = 0;
sub report_memory () {
        my $next_mem = qx[ps -p $$ -o size=]+0;
        printf "%+8d = %8d K\n", $next_mem-$mem, $next_mem; $mem = $next_mem;
}

for (0..1e5) {
        do 'x.inc';
        report_memory unless $_ % 1e4;
}
-------------------------

x.inc contains:
-------------------------
use utf8;
$x='x';
-------------------------

Comment 1 Petr Pisar 2014-02-10 13:49:09 UTC
Upstream report <https://rt.perl.org/Public/Bug/Display.html?id=121200>.

Comment 2 Petr Pisar 2014-02-10 14:09:35 UTC
All Fedoras are affected (confirmed on perl-5.18.2-296.fc21.x86_64, perl-5.18.2-289.fc20.x86_64, perl-5.16.3-266.fc19.x86_64).

Comment 3 Fedora End Of Life 2015-01-09 22:24:01 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2015-05-29 10:50:27 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Jan Kurik 2015-07-15 14:43:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 6 Petr Pisar 2015-08-26 11:51:19 UTC
This was fixed in perl-5.22.0 (since Fedora 23) by refactoring the code.
A fix for perl-5.20 is scheduled for perl-5.20.3 in this commit:

commit 8d89c0509dd5eb1de58dc6617f6e08599eb24792
Author: Tony Cook <tony@develop-help.com>
Date:   Mon Aug 10 13:37:26 2015 +0100

    [PATCH] [perl #123786] don't leak the temp utf8 copy of namepv

Comment 7 Petr Pisar 2015-08-26 11:52:25 UTC
Created attachment 1067231 [details]
Fix for perl-5.20

This simple fix could be applied to Fedora 21 too.

Comment 8 Fedora Update System 2015-09-16 13:28:11 UTC
perl-5.20.3-327.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15793

Comment 9 Fedora Update System 2015-09-16 14:58:35 UTC
perl-5.18.4-309.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16027

Comment 10 Fedora Update System 2015-09-17 01:01:38 UTC
perl-5.18.4-309.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update perl'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16027

Comment 11 Fedora Update System 2015-09-22 22:54:01 UTC
perl-5.20.3-327.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2015-09-25 06:17:26 UTC
perl-5.18.4-310.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-b4c6dd8cd3

Comment 13 Fedora Update System 2015-09-27 02:22:02 UTC
perl-5.18.4-310.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update perl'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-b4c6dd8cd3

Comment 14 Fedora Update System 2015-10-04 23:20:29 UTC
perl-5.18.4-310.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.