Bug 575842
Summary: | Perl leaks memory when assigning to %ENV | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Andrew Speer <andrew.speer> | |
Component: | perl | Assignee: | Marcela Mašláňová <mmaslano> | |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | medium | Docs Contact: | ||
Priority: | low | |||
Version: | 12 | CC: | buribullet, cweyl, iarnell, kasal, lkundrak, mmaslano, rc040203, tcallawa | |
Target Milestone: | --- | Keywords: | Reopened | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | perl-5.10.1-116.fc13 | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 577229 (view as bug list) | Environment: | ||
Last Closed: | 2010-08-03 01:10:28 UTC | Type: | --- | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 577229 |
Description
Andrew Speer
2010-03-22 14:23:58 UTC
Thank you for report with great explanation from upstream. I'll check and test it in different releases. I believe usually it's a good thing to use system libraries, but probably not in this case. I've tested this behaviour without PERL_USE_SAFE_PUTENV. It works fine, so in next updates, perl won't be using system putenv anymore. Any reason we can't build and push now? F-13 is divergent from F-12, so we don't have a problem there, and I'm sure Andrew would love to give us feedback while it's in updates-testing :) I was working on different issues and patches. I'd like to push more fixes at once if you don't mind. No problem -- Just a little well-intentioned motivational querying :) Fixed in rawhide for the meantime. This was fixed also in F-13 with perl-5.10.1-114 Hello, Is this really fixed? Today I examined perl-5.10.1-114.fc13.x86_64 in F-13 and observed apparently memory usage still grows constantly in simple script. Following simple script can show the memleak. Please verify the package, and if you see memleaks too, reopen this ticket please. # Note. %ENV leakage is serious problem for FastCGI. It is very important. ========================================= #!/usr/bin/perl -w use strict; for (my $i = 1; 1; $i++) { do { local %ENV = %ENV; # <==== this is the leak ! $ENV{HOME} = "/tmp"; }; print " --->> $i iterations --- mem used --->> ", memsize($$), "\n" unless $i % 10000; } sub memsize { my ($pid) = @_; open my $fh, '<', "/proc/$pid/status" or die $!; local $_; while (<$fh>) { chomp; return $1 if /^VmRSS:\s+(\d+)\D+$/; } } # borrowed & modified from: # http://www.issociate.de/board/post/474595/Memory_leak_in_Perl_5.10_on_Solaris_10_with__ENV.html I looked into Changelog, where are mentioned bugs related to PUTENV. https://bugzilla.redhat.com/show_bug.cgi?id=508496 https://bugzilla.redhat.com/show_bug.cgi?id=453646 https://rt.cpan.org/Public/Bug/Display.html?id=37194 I forgot remove PERL_USE_SAFE_PUTENV from this branch. perl-5.10.1-116.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/perl-5.10.1-116.fc13 Thank you for your quick update! Your perl-5.10.1-116.fc13.x86_64.rpm from koji has no more memleak for me with above script (and other fastcgi scripts). Thank you:-) # Note: When I installed the pkg, I got gpg error and I used --nogpgcheck # to avoid it. I don't know this is normal or not. Just FYI the correct upstream ticket was: http://rt.perl.org/rt3//Public/Bug/Display.html?id=73672 (In reply to comment #11) > Thank you for your quick update! > > Your perl-5.10.1-116.fc13.x86_64.rpm from koji has no more memleak for me > with above script (and other fastcgi scripts). Thank you:-) > > # Note: When I installed the pkg, I got gpg error and I used --nogpgcheck > # to avoid it. I don't know this is normal or not. Koji builds are not signed. There are signed after push on mirror. perl-5.10.1-116.fc13 has been pushed to the Fedora 13 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 'yum --enablerepo=updates-testing update perl'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/perl-5.10.1-116.fc13 perl-5.10.1-116.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. |