Skip Menu |

This queue is for tickets about the Test-Harness-FileFilter CPAN distribution.

Report information
The Basics
Id: 34924
Status: open
Priority: 0/
Queue: Test-Harness-FileFilter

People
Owner: Nobody in particular
Requestors: imacat [...] mail.imacat.idv.tw
Cc:
AdminCc:

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



Subject: Bottomless Recursion in Test::Harness::FileFilter
Dear Claes Jakobsson, Hi. This is imacat from Taiwan. I found that your Test-Harness-FileFilter-0.01 gets into bottomless deep recursion, which eats up all the memory and dies. I tried to investigate further. It seems that your Test::Harness::FileFilter tried to replace the Test::Harness::_run_all_tests() and call the original one afterwards. But Test::Harness::_run_all_tests() was removed for Test::Harness version >= 2.56. This results the preservation of &Test::Harness::_run_all_tests() will point back to the replacement itself, and become calling itself recursively. I do not know what to do with this situation. Maybe you can take some time to look into this issue. The terminal log is attached below. Hope that this helps. Please tell me if you need any more information, or if I could be of any help. Thank you. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 28884 imacat 25 0 1221m 1.2g 1824 R 100 59.8 0:33.15 perl imacat@rinse tmp/Test-Harness-FileFilter-0.01 % perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi-ld Copyright 1987-2006, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. imacat@rinse tmp/Test-Harness-FileFilter-0.01 % perl Makefile.PL Checking if your kit is complete... Looks good Writing Makefile for Test::Harness::FileFilter imacat@rinse tmp/Test-Harness-FileFilter-0.01 % make cp lib/Test/Harness/FileFilter.pm blib/lib/Test/Harness/FileFilter.pm Manifying blib/man3/Test::Harness::FileFilter.3 imacat@rinse tmp/Test-Harness-FileFilter-0.01 % make test t/00-load...........1/1 # Testing Test::Harness::FileFilter 0.01, Perl 5.008008, /usr/bin/perl t/00-load...........ok t/01-ignore.........1/2 # Testing HARNESS_IGNORE_FILES Deep recursion on anonymous subroutine at /home/imacat/tmp/Test-Harness-FileFilter-0.01/blib/lib/Test/Harness/FileFilter.pm line 41. make: *** [test_dynamic] Interrupt imacat@rinse tmp/Test-Harness-FileFilter-0.01 % perl -Iblib/lib -Iblib/arch t/01-ignore.t 1..2 ok 1 - use Test::Harness::FileFilter; # Testing HARNESS_IGNORE_FILES Deep recursion on anonymous subroutine at blib/lib/Test/Harness/FileFilter.pm line 41. imacat@rinse tmp/Test-Harness-FileFilter-0.01 %
Subject: Re: [rt.cpan.org #34924] Bottomless Recursion in Test::Harness::FileFilter
Date: Fri, 9 May 2008 14:22:01 +0200
To: bug-Test-Harness-FileFilter [...] rt.cpan.org
From: Claes Jakobsson <claes [...] versed.se>
Hi, sorry for the late reply. I've looked into this and can't find a suitable solution. The best thing would probably be to make the Makefile.PL check what version of Test::Harness is installed and refuse to install if it's a too new version. The reason I did this module was because I wanted "make test" to just run a bunch of files and wanted to use perls regexp istead of the ones I can supply via TEST_FILES to make test. Are you using the module or was discovered when doing automated smoke testing? Cheers, Claes On 12 apr 2008, at 22.27, Yi Ma Mao via RT wrote: Show quoted text
> > Sat Apr 12 16:27:45 2008: Request 34924 was acted upon. > Transaction: Ticket created by IMACAT > Queue: Test-Harness-FileFilter > Subject: Bottomless Recursion in Test::Harness::FileFilter > Broken in: 0.01 > Severity: (no value) > Owner: Nobody > Requestors: imacat@mail.imacat.idv.tw > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=34924 > > > > Dear Claes Jakobsson, > > Hi. This is imacat from Taiwan. I found that your > Test-Harness-FileFilter-0.01 gets into bottomless deep recursion, > which > eats up all the memory and dies. I tried to investigate further. It > seems that your Test::Harness::FileFilter tried to replace the > Test::Harness::_run_all_tests() and call the original one afterwards. > But Test::Harness::_run_all_tests() was removed for Test::Harness > version >= 2.56. This results the preservation of > &Test::Harness::_run_all_tests() will point back to the replacement > itself, and become calling itself recursively. > > I do not know what to do with this situation. Maybe you can take > some time to look into this issue. > > The terminal log is attached below. Hope that this helps. Please > tell me if you need any more information, or if I could be of any > help. > Thank you. > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 28884 imacat 25 0 1221m 1.2g 1824 R 100 59.8 0:33.15 perl > > imacat@rinse tmp/Test-Harness-FileFilter-0.01 % perl -v > > This is perl, v5.8.8 built for x86_64-linux-thread-multi-ld > > Copyright 1987-2006, Larry Wall > > Perl may be copied only under the terms of either the Artistic License > or the > GNU General Public License, which may be found in the Perl 5 source > kit. > > Complete documentation for Perl, including FAQ lists, should be > found on > this system using "man perl" or "perldoc perl". If you have access > to the > Internet, point your browser at http://www.perl.org/, the Perl Home > Page. > > imacat@rinse tmp/Test-Harness-FileFilter-0.01 % perl Makefile.PL > Checking if your kit is complete... > Looks good > Writing Makefile for Test::Harness::FileFilter > imacat@rinse tmp/Test-Harness-FileFilter-0.01 % make > cp lib/Test/Harness/FileFilter.pm blib/lib/Test/Harness/FileFilter.pm > Manifying blib/man3/Test::Harness::FileFilter.3 > imacat@rinse tmp/Test-Harness-FileFilter-0.01 % make test > t/00-load...........1/1 # Testing Test::Harness::FileFilter 0.01, Perl > 5.008008, /usr/bin/perl > t/00-load...........ok > t/01-ignore.........1/2 # Testing HARNESS_IGNORE_FILES > Deep recursion on anonymous subroutine at > /home/imacat/tmp/Test-Harness-FileFilter-0.01/blib/lib/Test/Harness/ > FileFilter.pm > line 41. > make: *** [test_dynamic] Interrupt > > imacat@rinse tmp/Test-Harness-FileFilter-0.01 % perl -Iblib/lib > -Iblib/arch t/01-ignore.t > 1..2 > ok 1 - use Test::Harness::FileFilter; > # Testing HARNESS_IGNORE_FILES > Deep recursion on anonymous subroutine at > blib/lib/Test/Harness/FileFilter.pm line 41. > > imacat@rinse tmp/Test-Harness-FileFilter-0.01 % >
Dear Claes, Hi. This is imacat from Taiwan. Regarding to your question, On 2008-05-09 08:22:26 Fri, claes@versed.se wrote: Show quoted text
> The best thing would probably be to make the Makefile.PL check what > version of Test::Harness is installed and refuse to install if it's a > too new version.
I suppose the following code may work eval { require Test::Harness; }; exit 0 unless Test::Harness->can("_run_all_tests"); The above can both be used in your Makefile.PL, and in your FileFilter.pm before "my $orig_func = \&Test::Harness::_run_all_tests;". Show quoted text
> The reason I did this module was because I wanted "make test" to just > run a bunch of files and wanted to use perls regexp istead of the ones > I can supply via TEST_FILES to make test.
I see. In this case, I would suggest you file a wishlist request to Test::Harness, instead of writing your own. You can use the rt.cpan.org request tracking system: http://rt.cpan.org/Public/Bug/Report.html?Queue=Test-Harness This shall insure future compatibility. If you choose to do so, I would suggest you remove all your current Test-Harness-FileFilter-* files, to avoid causing bottomless-recursion problems with future CPAN smoke testers, and prevent someone accidentally tries your Test-Harness-FileFilter. Show quoted text
> Are you using the module or was discovered when doing automated smoke > testing?
In fact, no. I'm not using this module. I discovered this when running automated smoke tests.
Hi,

I ran into this module during automated testing for all Test-* modules for Test::Builder 1.5.  It consumed all the memory on my laptop, quite a surprise.

I see it's quite old, could it either be patched or removed?  It's a bit of a land mine to automated testing.

Thanks
Schwern
Note: on 5.18.2 tests did not finish in 30 minutes. -- Alexandr Ciornii, http://chorny.net