Skip Menu |
 

This queue is for tickets about the Config-IniFiles CPAN distribution.

Report information
The Basics
Id: 23608
Status: resolved
Priority: 0/
Queue: Config-IniFiles

People
Owner: Nobody in particular
Requestors: melezhik [...] gmail.com
Cc:
AdminCc:

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



Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 161924D806F for <bug-Config-IniFiles [...] rt.cpan.org>; Sat, 25 Nov 2006 06:00:58 -0500 (EST)
Received: (qmail 25802 invoked by alias); 25 Nov 2006 11:00:58 -0000
Received: from nz-out-0102.google.com (HELO nz-out-0102.google.com) (64.233.162.192) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Sat, 25 Nov 2006 03:00:55 -0800
Received: by nz-out-0102.google.com with SMTP id o1so514450nzf for <bug-Config-IniFiles [...] rt.cpan.org>; Sat, 25 Nov 2006 03:00:49 -0800 (PST)
Received: by 10.65.15.17 with SMTP id s17mr18104835qbi.1164452448903; Sat, 25 Nov 2006 03:00:48 -0800 (PST)
Received: by 10.65.110.2 with HTTP; Sat, 25 Nov 2006 03:00:48 -0800 (PST)
Delivered-To: cpan-bug+config-inifiles [...] diesel.bestpractical.com
MIME-Version: 1.0
Subject: memory leak bug
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=JGoXOJB02aG038Z/QpsYCVN+0RyYPPcRFGMqPBafbZJ97d+AVvlYtvyVgqfVQkb1v4R4ESN7m3Sk7T+0r3m08O16ubW5uzpvFjE3/CWwrke+xgkfeHNuN//3kgqiDiNBHX9qL2lnFsHIsW5X6ZIhEDWNFGfUdP+dA4lOHzqAHw4=
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,DK_SIGNED,DK_VERIFIED,SPF_PASS
Return-Path: <melezhik [...] gmail.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Config-IniFiles [...] rt.cpan.org
Content-Disposition: inline
Date: Sat, 25 Nov 2006 14:00:48 +0300
Received-SPF: pass (x1.develooper.com: domain of melezhik [...] gmail.com designates 64.233.162.192 as permitted sender)
Message-Id: <c7d356120611250300p35558d88m8b7a30d33116c533 [...] mail.gmail.com>
content-type: text/plain; charset="utf-8"; format="flowed"
To: bug-Config-IniFiles [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: "Alexey Melezhik" <melezhik [...] gmail.com>
X-RT-Original-Encoding: ISO-8859-1
Content-Length: 1055
perl -MCPAN -e shell m Config::IniFiles ... Module id = Config::IniFiles DESCRIPTION Read/Write INI-Style configuration files CPAN_USERID WADG (Jeremy Wadsack <dgsupport@wadsack-allen.com>) CPAN_VERSION 2.38 CPAN_FILE W/WA/WADG/Config-IniFiles-2.38.tar.gz DSLI_STATUS Rmph (released,mailing-list,perl,hybrid) MANPAGE Config::IniFiles - A module for reading .ini-style configuration files. INST_FILE /usr/share/perl5/Config/IniFiles.pm INST_VERSION 2.39 ========= use Config::IniFiles; use strict; for (;;) { my $cfg_default = new Config::IniFiles( -file => "../../cfg/default.cfg", -allowcontinue => 1, ); my $cfg = new Config::IniFiles( -file => "../../cfg/config.cfg", -import => $cfg_default, -allowcontinue => 1 , ); }; ========== Hi! I am on debian. perl, v5.8.8 when I run this script I get memory leak (at about several Mb in second speed) -- Alexey Melezhik
MIME-Version: 1.0
In-Reply-To: <c7d356120611250300p35558d88m8b7a30d33116c533 [...] mail.gmail.com>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-7744-1170166277-1635.23608-0-0 [...] rt.cpan.org>
References: <c7d356120611250300p35558d88m8b7a30d33116c533 [...] mail.gmail.com>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 257
Download (untitled) / with headers
text/plain 257b
Show quoted text
> when I run this script I get memory leak (at about several Mb in > second speed)
Unles I miss something, you're creating two new objects per loop, so there's no wonder the memory used by the process grows very fast. -- Close the world, txEn eht nepO.
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00,DK_SIGNED,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-7744-1170166277-1635.23608-6-0 [...] rt.cpan.org>
Content-Disposition: inline
Received-SPF: pass (x1.develooper.com: domain of melezhik [...] gmail.com designates 64.233.162.229 as permitted sender)
References: <RT-Ticket-23608 [...] rt.cpan.org> <c7d356120611250300p35558d88m8b7a30d33116c533 [...] mail.gmail.com> <rt-3.6.HEAD-7744-1170166277-1635.23608-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
X-RT-Original-Encoding: ISO-8859-1
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 28A8F4D8189 for <bug-Config-IniFiles [...] rt.cpan.org>; Tue, 30 Jan 2007 09:21:15 -0500 (EST)
Received: (qmail 23315 invoked by alias); 30 Jan 2007 14:21:14 -0000
Received: from nz-out-0506.google.com (HELO nz-out-0506.google.com) (64.233.162.229) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 30 Jan 2007 06:21:04 -0800
Received: by nz-out-0506.google.com with SMTP id o1so1573739nzf for <bug-Config-IniFiles [...] rt.cpan.org>; Tue, 30 Jan 2007 06:21:00 -0800 (PST)
Received: by 10.65.233.16 with SMTP id k16mr12099228qbr.1170166859920; Tue, 30 Jan 2007 06:20:59 -0800 (PST)
Received: by 10.65.112.8 with HTTP; Tue, 30 Jan 2007 06:20:59 -0800 (PST)
Delivered-To: cpan-bug+config-inifiles [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #23608] memory leak bug
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=G+aolgBufay4wNU831HWIYFm75zcutD3Zkd+mZBBhJ39iPK3VQjFmLCxMxWugSn+cULzDHxvaNfa+wUNkN2ajbh16L89fKf+g2xDEyoriUOgvnboH4O1vIHxJuM6d9zf7VJXvn/tYbgpFdbyctSMgKkkCs79QTg5eGMPfnbPnYU=
Return-Path: <melezhik [...] gmail.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-Config-IniFiles [...] rt.cpan.org
Date: Tue, 30 Jan 2007 17:20:59 +0300
Message-Id: <c7d356120701300620q6a07177ey855c1fb62a3c2742 [...] mail.gmail.com>
To: bug-Config-IniFiles [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: "Alexey Melezhik" <melezhik [...] gmail.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.6.HEAD-7773-1170166894-1405.23608-0-0 [...] rt.cpan.org>
Content-Length: 881
Download (untitled) / with headers
text/plain 881b
Hi! Yeah, but these 2 objects are cerated as lexial scope vars, they are undefed (hopefully) with every loop iteration. But actually they are not! Actually I studied this bug in depth and found out that memory leak occur only if we use "inheritance" in Config::IniFiles constrcutor; (when we attach already existed Config::IniFiles object to newly created one). In this case obects are not freed even though they are binded to lexical scopes; 2007/1/30, Sébastien Aperghis-Tramoni via RT <bug-Config-IniFiles@rt.cpan.org>: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=23608 > >
> > when I run this script I get memory leak (at about several Mb in > > second speed)
> > Unles I miss something, you're creating two new objects per loop, > so there's no wonder the memory used by the process grows very fast. > > -- > Close the world, txEn eht nepO. >
-- Alexey Melezhik
MIME-Version: 1.0
In-Reply-To: <c7d356120611250300p35558d88m8b7a30d33116c533 [...] mail.gmail.com>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <c7d356120611250300p35558d88m8b7a30d33116c533 [...] mail.gmail.com>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-4108-1241284093-227.23608-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 780
Download (untitled) / with headers
text/plain 780b
I cannot seem to reproduce this bug with the following test program, here on Mandriva Linux Cooker with either the system perl-5.10.0 or perl-5.8.x-latest: {{{{{{{{{{{{{ use strict; use warnings; use lib "./lib"; use Config::IniFiles; for (;;) { print "Foo\n"; my $cfg_default = Config::IniFiles->new( -file => "./win1.ini", -allowcontinue => 1, ); print "Bar\n"; my $cfg = Config::IniFiles->new( -file => "./win2.ini", -import => $cfg_default, -allowcontinue => 1 , ); } }}}}}}}}}}}}}} win1.ini and win2.ini are copies of a win.ini file from an old Windows partition. Perl runs but the memory usage does not seem to grow, even when ran for several minutes. So I'm closing until I receive more information.


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.