Skip Menu |

This queue is for tickets about the IO-AIO CPAN distribution.

Report information
The Basics
Id: 55072
Status: resolved
Priority: 0/
Queue: IO-AIO

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

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



Subject: Memory leak in aio_scandir
Daemon process using IO::AIO leaks, narrowed it down to aio_scandir with the following minimal case: ----- #!/usr/bin/perl use IO::AIO; use Devel::Leak; print "IO::AIO Version: $IO::AIO::VERSION,\n"; my $handle; my $count = Devel::Leak::NoteSV($handle); aio_scandir $ENV{'HOME'}, 4, sub { warn sprintf( "%d directories and %d others found\n\n", scalar @{ $_[0] }, scalar @{ $_[1] } ); }; IO::AIO::poll_wait, IO::AIO::poll_cb while IO::AIO::nreqs; Devel::Leak::CheckSV($handle); ----- Output of the above: IO::AIO Version: 3.6 74 directories and 134 others found new 0x751d98 : SV = PV(0x654b78) at 0x751d98 REFCNT = 1 FLAGS = (POK,FAKE,READONLY,pPOK) PV = 0x6913a0 "IO::AIO::REQ" CUR = 12 LEN = 0 new 0x751db0 : SV = PVHV(0x7323a0) at 0x751db0 REFCNT = 1 FLAGS = (READONLY,SHAREKEYS) ARRAY = 0x77a980 (0:6, 1:2) hash quality = 125.0% KEYS = 2 FILL = 2 MAX = 7 RITER = -1 EITER = 0x0 new 0x751dc8 : SV = PVGV(0x680ed0) at 0x751dc8 REFCNT = 1 FLAGS = (MULTI) NAME = "DESTROY" NAMELEN = 7 GvSTASH = 0x6fc818 "IO::AIO::REQ" GP = 0x690280 SV = 0x0 REFCNT = 1 IO = 0x0 FORM = 0x0 AV = 0x0 HV = 0x0 CV = 0x0 CVGEN = 0x6 LINE = 976 FILE = "/usr/local/lib/perl/5.10.1/IO/AIO.pm" FLAGS = 0x2 EGV = 0x751dc8 "DESTROY" new 0x751de0 : SV = PVGV(0x680f00) at 0x751de0 REFCNT = 1 FLAGS = (MULTI) NAME = "AUTOLOAD" NAMELEN = 8 GvSTASH = 0x6fc818 "IO::AIO::REQ" GP = 0x77b9d0 SV = 0x0 REFCNT = 1 IO = 0x0 FORM = 0x0 AV = 0x0 HV = 0x0 CV = 0x0 CVGEN = 0x6 LINE = 976 FILE = "/usr/local/lib/perl/5.10.1/IO/AIO.pm" FLAGS = 0x2 EGV = 0x751de0 "AUTOLOAD" new 0x751df8 : SV = NULL(0x0) at 0x751df8 REFCNT = 1 FLAGS = (PADSTALE,PADMY) new 0x751e10 : SV = NULL(0x0) at 0x751e10 REFCNT = 1 FLAGS = (PADSTALE,PADMY) new 0x748858 : SV = NULL(0x0) at 0x748858 REFCNT = 1 FLAGS = (PADSTALE,PADMY) new 0x7489d8 : SV = PVAV(0x658080) at 0x7489d8 REFCNT = 1 FLAGS = (READONLY) ARRAY = 0x77a950 FILL = 0 MAX = 3 ARYLEN = 0x0 FLAGS = (REAL) new 0x748b28 : SV = NULL(0x0) at 0x748b28 REFCNT = 1 FLAGS = (PADSTALE,PADMY) new 0x673690 : SV = PVGV(0x680e70) at 0x673690 REFCNT = 1 FLAGS = (MULTI) NAME = "DESTROY" NAMELEN = 7 GvSTASH = 0x6df4f8 "IO::AIO::GRP" GP = 0x77a350 SV = 0x0 REFCNT = 1 IO = 0x0 FORM = 0x0 AV = 0x0 HV = 0x0 CV = 0x0 CVGEN = 0xa LINE = 907 FILE = "/usr/local/lib/perl/5.10.1/IO/AIO.pm" FLAGS = 0x2 EGV = 0x673690 "DESTROY" new 0x6736a8 : SV = PVGV(0x680ea0) at 0x6736a8 REFCNT = 1 FLAGS = (MULTI) NAME = "AUTOLOAD" NAMELEN = 8 GvSTASH = 0x6df4f8 "IO::AIO::GRP" GP = 0x77a3b0 SV = 0x0 REFCNT = 1 IO = 0x0 FORM = 0x0 AV = 0x0 HV = 0x0 CV = 0x0 CVGEN = 0xa LINE = 907 FILE = "/usr/local/lib/perl/5.10.1/IO/AIO.pm" FLAGS = 0x2 EGV = 0x6736a8 "AUTOLOAD" old (1): 0 SV = UNKNOWN(0xff) (0x71ef18) at 0x667e70 REFCNT = 0 FLAGS = () old (1): 0 SV = UNKNOWN(0xff) (0x71f0b0) at 0x667b28 REFCNT = 0 FLAGS = () old (1): 0 SV = UNKNOWN(0xff) (0x656f40) at 0x667d20 REFCNT = 0 FLAGS = () old (1): 0 SV = UNKNOWN(0xff) (0x667b28) at 0x667d80 REFCNT = 0 FLAGS = () asackett@skunk:~/www-clients/emtl/scratch$ perl memory_leak_fix.pl IO::AIO Version: 3.6, 74 directories and 134 others found new 0x23c9d88 : SV = NULL(0x0) at 0x23c9d88 REFCNT = 1 FLAGS = (PADSTALE,PADMY) new 0x23c9da0 : SV = PVAV(0x22d0080) at 0x23c9da0 REFCNT = 1 FLAGS = (READONLY) ARRAY = 0x23f2ac0 FILL = 0 MAX = 3 ARYLEN = 0x0 FLAGS = (REAL) new 0x23c9db8 : SV = PV(0x22ccc38) at 0x23c9db8 REFCNT = 1 FLAGS = (POK,FAKE,READONLY,pPOK) PV = 0x2309390 "IO::AIO::REQ" CUR = 12 LEN = 0 new 0x23c9dd0 : SV = PVHV(0x23aa390) at 0x23c9dd0 REFCNT = 1 FLAGS = (READONLY,SHAREKEYS) ARRAY = 0x23f2af0 (0:6, 1:2) hash quality = 125.0% KEYS = 2 FILL = 2 MAX = 7 RITER = -1 EITER = 0x0 new 0x23c9de8 : SV = PVGV(0x22f8ec0) at 0x23c9de8 REFCNT = 1 FLAGS = (MULTI) NAME = "DESTROY" NAMELEN = 7 GvSTASH = 0x2374808 "IO::AIO::REQ" GP = 0x2308270 SV = 0x0 REFCNT = 1 IO = 0x0 FORM = 0x0 AV = 0x0 HV = 0x0 CV = 0x0 CVGEN = 0x6 LINE = 976 FILE = "/usr/local/lib/perl/5.10.1/IO/AIO.pm" FLAGS = 0x2 EGV = 0x23c9de8 "DESTROY" new 0x23c9e00 : SV = PVGV(0x22f8ef0) at 0x23c9e00 REFCNT = 1 FLAGS = (MULTI) NAME = "AUTOLOAD" NAMELEN = 8 GvSTASH = 0x2374808 "IO::AIO::REQ" GP = 0x23f3b40 SV = 0x0 REFCNT = 1 IO = 0x0 FORM = 0x0 AV = 0x0 HV = 0x0 CV = 0x0 CVGEN = 0x6 LINE = 976 FILE = "/usr/local/lib/perl/5.10.1/IO/AIO.pm" FLAGS = 0x2 EGV = 0x23c9e00 "AUTOLOAD" new 0x23c9e18 : SV = NULL(0x0) at 0x23c9e18 REFCNT = 1 FLAGS = (PADSTALE,PADMY) new 0x23c9e30 : SV = NULL(0x0) at 0x23c9e30 REFCNT = 1 FLAGS = (PADSTALE,PADMY) new 0x23b86f0 : SV = NULL(0x0) at 0x23b86f0 REFCNT = 1 FLAGS = (PADSTALE,PADMY) new 0x22eb690 : SV = PVGV(0x22f8e60) at 0x22eb690 REFCNT = 1 FLAGS = (MULTI) NAME = "DESTROY" NAMELEN = 7 GvSTASH = 0x23574e8 "IO::AIO::GRP" GP = 0x23f24c0 SV = 0x0 REFCNT = 1 IO = 0x0 FORM = 0x0 AV = 0x0 HV = 0x0 CV = 0x0 CVGEN = 0xa LINE = 907 FILE = "/usr/local/lib/perl/5.10.1/IO/AIO.pm" FLAGS = 0x2 EGV = 0x22eb690 "DESTROY" new 0x22eb6a8 : SV = PVGV(0x22f8e90) at 0x22eb6a8 REFCNT = 1 FLAGS = (MULTI) NAME = "AUTOLOAD" NAMELEN = 8 GvSTASH = 0x23574e8 "IO::AIO::GRP" GP = 0x23f2520 SV = 0x0 REFCNT = 1 IO = 0x0 FORM = 0x0 AV = 0x0 HV = 0x0 CV = 0x0 CVGEN = 0xa LINE = 907 FILE = "/usr/local/lib/perl/5.10.1/IO/AIO.pm" FLAGS = 0x2 EGV = 0x22eb6a8 "AUTOLOAD" old (1): 0 SV = UNKNOWN(0xff) (0x22cef40) at 0x22dfd20 REFCNT = 0 FLAGS = () old (1): 0 SV = UNKNOWN(0xff) (0x22dfb28) at 0x22dfd80 REFCNT = 0 FLAGS = () old (1): 0 SV = UNKNOWN(0xff) (0x2397568) at 0x22dfe70 REFCNT = 0 FLAGS = () old (1): 0 SV = UNKNOWN(0xff) (0x2397640) at 0x22dfb28 REFCNT = 0 FLAGS = () OS is Debian squeeze on AMD64; perl is 5.10.1 from Debian repository, IO::AIO is 3.6 from CPAN.
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #55072] Memory leak in aio_scandir
Date: Mon, 1 Mar 2010 05:59:11 +0100
To: Art Sackett via RT <bug-IO-AIO [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
Hi! You sent a possible bug report on or via rt.cpan.org. Please read this mail carefully if you want to be heard. Most likely, your report will be ignored. Please close the ticket again and sent it to the official contact address for the module in question (or send it to rt.cpan.org@schmorp.de). Why is this necessary? rt.cpan.org has many deficiencies which makes it tedious and hard to use, increasing the workload on the people who provide all the perl modules you probably appreciate (and that is really to be avoided - module authors should be able to invest all their time into improving their modules and not fighting with rt.cpan.org's bugs). Still, for some people, rt.cpan.org is useful to have, and some people even like it and really want to use it. That is fine, too. Unfortunately, the designers of rt.cpan.org didn't make their "service" optional - you can neither opt-in nor opt-out of rt.cpan.org as a module author. Just like a spammer, rt.cpan.org forces its "service" (whether wanted or unwanted) on everybody. Just like a spammer, they don't care for the people they actively hurt. Just like a spammer, they don't don't care to fix these issues and make their "service" ethically acceptable. You cannot even configure it to redirect tickets to somewhere else. Unfortunately, ignoring rt.cpan.org is not an option either: for people reporting possible bugs there is no indication that their report will be ignored, and for module authors it means they miss possibly vital bug reports (and of course it's a great impression if rt.cpan.org has lots of bug reports that are unanswered, making a module unmaintained when in fact the opposite might be true). This is why it is important that you delete/resolve your ticket. I am sorry that this wasted a bit of your time, but please understand that I am just as much a victim as you are - the problem is the unethical stance of the rt.cpan.org providers who force their "service" on everybody. Please redirect your bug report as stated in the beginning of this mail, and please consider petitioning the rt.cpan.org providers to stop their unethical behaviour and allow opt-in, opt-out, or some redirect option. Thanks a lot, Marc Lehmann <rt.cpan.org@schmorp.de>
Deleting as requested.