This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id:
120781
Status:
resolved
Priority:
Low/Low
Queue:

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

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
2.18-TRIAL



Subject: Memory leak or infinite loop while installing BDFOY/Bundle-BDFOY-20160101
Hello! I am currently running a CPAN smoker using the command: /home/cpan3/install/bin/perl -MCPAN::Reporter::Smoker -e start(install => 1, force_trust => 1, restart_delay => 1500000) That then called the command: /home/cpan3/install/bin/perl -MCPAN -e $CPAN::Config->{test_report} = 1; $CPAN::Config->{trust_test_report_history} = 1; install( 'BDFOY/Bundle-BDFOY-20160101.tar.gz' ) To install the above distribution. I observe the install going fine up to the following point: Installing /home/cpan2/install/man/man3/Brick::Regexes.3 Installing /home/cpan2/install/man/man3/Brick::General.3 Installing /home/cpan2/install/man/man3/Brick::Selectors.3 Installing /home/cpan2/install/man/man3/Brick::Filters.3 Appending installation info to /home/cpan2/install/lib/perl5/5.26.0/x86_64-linux-thread-multi/perllocal.pod BDFOY/Brick-0.227.tar.gz /usr/bin/make install -- OK At which point I observe very high memory usage, and the install hangs at that point: UID PID PPID C SZ RSS PSR STIME TTY TIME CMD cpan3 10897 25704 79 9447976 25043404 0 16:23 pts/6 01:24:55 /home/cpan3/install/bin/perl -MCPAN -e $CPAN::Config->{test_report} = 1; $CPAN::Config->{trust_test_report_history} = 1; install( 'BDFOY/Bundle-BDFOY-20160101.tar.gz' ) Yes, that's 32 GB of RAM - after `make install` finished, before starting any other module. A short while later, another smoker hits the same part of the same module and also hangs, and starts consuming memory, so I CTRL-C it: Appending installation info to /home/cpan2/install/lib/perl5/5.26.0/x86_64-linux-thread-multi/perllocal.pod BDFOY/Brick-0.227.tar.gz /usr/bin/make install -- OK ^C Stopped during Bundle-BDFOY-20160101. CPAN testing halted on SIGINT. Continue (y/n)? [n] Use of uninitialized value $answer in lc at /home/cpan2/install/lib/perl5/site_perl/5.26.0/CPAN/Reporter/Smoker.pm line 317. No history written (no histfile specified). Lockfile removed. After Ctrl-C, I tried restarting the install. I got the following output followed by - you guessed it - a hang, 100% CPU, and rapidly rising memory usage. cpan2@digitalis:~$ install/bin/perl -MCPAN -e "$CPAN::Config->{test_report} = 1; $CPAN::Config->{trust_test_report_history} = 1; install( 'BDFOY/Bundle-BDFOY-20160101.tar.gz' )" Reading '/home/dcollins/toolchain/minicpan/authors/01mailrc.txt.gz' ............................................................................DONE Reading '/home/dcollins/toolchain/minicpan/modules/02packages.details.txt.gz' Database was generated on Sun, 26 Mar 2017 07:53:49 GMT ............................................................................DONE Reading '/home/dcollins/toolchain/minicpan/modules/03modlist.data.gz' DONE Checksum for /home/dcollins/toolchain/minicpan/authors/id/B/BD/BDFOY/Bundle-BDFOY-20160101.tar.gz ok Configuring B/BD/BDFOY/Bundle-BDFOY-20160101.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Warning: prerequisite App::scriptdist 0 not found. Warning: prerequisite Bundle::BDFOY 0 not found. Warning: prerequisite Business::ISMN 0 not found. Warning: prerequisite CPAN::PackageDetails 0 not found. Warning: prerequisite Data::Constraint 0 not found. Warning: prerequisite Distribution::Cooker 0 not found. Warning: prerequisite File::Find::Closures 0 not found. Warning: prerequisite File::Fingerprint 0 not found. Warning: prerequisite Git::Github::Creator 0 not found. Warning: prerequisite HTTP::Cookies::Chrome 0 not found. Warning: prerequisite HTTP::Cookies::Omniweb 0 not found. Warning: prerequisite HTTP::Cookies::iCab 0 not found. Warning: prerequisite HTTP::SimpleLinkChecker 0 not found. Warning: prerequisite HTTP::Size 0 not found. Warning: prerequisite Log::Log4perl::Appender::ScreenColoredLevels::UsingMyColors 0 not found. Warning: prerequisite Mac::OSVersion 0 not found. Warning: prerequisite Mac::iPhoto::Shell 0 not found. Warning: prerequisite Mac::iTerm::LaunchPad 0 not found. Warning: prerequisite MacOSX::Alias 0 not found. Warning: prerequisite Module::Extract::DeclaredMinimumPerl 0 not found. Warning: prerequisite Module::Extract::Namespaces 0 not found. Warning: prerequisite Module::Release 0 not found. Warning: prerequisite Module::Release::Git 0 not found. Warning: prerequisite Module::Starter::AddModule 0 not found. Warning: prerequisite Modulino::Demo 0 not found. Warning: prerequisite MyCPAN::App::DPAN 0 not found. Warning: prerequisite MyCPAN::Indexer 0 not found. Warning: prerequisite Net::SSH::Perl::ProxiedIPC 0 not found. Warning: prerequisite Net::SSH::Perl::WithSocks 0 not found. Warning: prerequisite Netscape::Bookmarks 0 not found. Warning: prerequisite Object::Iterate 0 not found. Warning: prerequisite PPI::App::ppi_version::BDFOY 0 not found. Warning: prerequisite PeGS::PDF 0 not found. Warning: prerequisite Perl::MinimumVersion::Fast 0 not found. Warning: prerequisite PerlPowerTools 0 not found. Warning: prerequisite Pod::InDesign::TaggedText 0 not found. Warning: prerequisite Pod::InDesign::TaggedText::TPR 0 not found. Warning: prerequisite Pod::Perldoc::ToToc 0 not found. Warning: prerequisite Pod::PseudoPod::PerlTricks 0 not found. Warning: prerequisite Pod::SpeakIt::MacSpeech 0 not found. Warning: prerequisite Pod::WordML 0 not found. Warning: prerequisite Psychic::Ninja 0 not found. Warning: prerequisite ReturnValue 0 not found. Warning: prerequisite SourceCode::LineCounter::Perl 0 not found. Warning: prerequisite String::Sprintf 0 not found. Warning: prerequisite Surveyor::App 0 not found. Warning: prerequisite Surveyor::Benchmark::HTMLEntities 0 not found. Warning: prerequisite Surveyor::Benchmark::SchwartzianTransform::SortFilesBySize 0 not found. Warning: prerequisite Task::MasteringPerl 0 not found. Warning: prerequisite Task::MojoLearningEnvironment 0 not found. Warning: prerequisite Test::Env 0 not found. Warning: prerequisite Test::HTTPStatus 0 not found. Warning: prerequisite Test::ISBN 0 not found. Warning: prerequisite Test::WWW::Accessibility 0 not found. Warning: prerequisite Tie::BoundedInteger 0 not found. Warning: prerequisite Tie::Cycle 0 not found. Warning: prerequisite Tie::StringArray 0 not found. Warning: prerequisite Tie::Timely 0 not found. Warning: prerequisite Tie::Toggle 0 not found. Warning: prerequisite Unicode::Support 0 not found. Warning: prerequisite Unicode::Tussle 0 not found. Warning: prerequisite WordPress::Grep 0 not found. Warning: prerequisite github_creator 0 not found. Warning: prerequisite perlbench 0 not found. Warning: prerequisite scriptdist 0 not found. Generating a Unix-style Makefile Writing Makefile for Bundle::BDFOY Writing MYMETA.yml and MYMETA.json (/home/cpan2/install/bin/perl Makefile.PL exited with 0) CPAN::Reporter: Makefile.PL result is 'pass', No errors. BDFOY/Bundle-BDFOY-20160101.tar.gz /home/cpan2/install/bin/perl Makefile.PL -- OK Running make for B/BD/BDFOY/Bundle-BDFOY-20160101.tar.gz
Show quoted text
---- Unsatisfied dependencies detected during ---- ---- BDFOY/Bundle-BDFOY-20160101.tar.gz ---- App::scriptdist [requires] Bundle::BDFOY [requires] Business::ISMN [requires] CPAN::PackageDetails [requires] Data::Constraint [requires] Distribution::Cooker [requires] File::Find::Closures [requires] File::Fingerprint [requires] Git::Github::Creator [requires] HTTP::Cookies::Chrome [requires] HTTP::Cookies::Omniweb [requires] HTTP::Cookies::iCab [requires] HTTP::SimpleLinkChecker [requires] HTTP::Size [requires] Log::Log4perl::Appender::ScreenColoredLevels::UsingMyColors [requires] Mac::OSVersion [requires] Mac::iPhoto::Shell [requires] Mac::iTerm::LaunchPad [requires] MacOSX::Alias [requires] Module::Extract::DeclaredMinimumPerl [requires] Module::Extract::Namespaces [requires] Module::Release [requires] Module::Release::Git [requires] Module::Starter::AddModule [requires] Modulino::Demo [requires] MyCPAN::App::DPAN [requires] MyCPAN::Indexer [requires] Net::SSH::Perl::ProxiedIPC [requires] Net::SSH::Perl::WithSocks [requires] Netscape::Bookmarks [requires] Object::Iterate [requires] PPI::App::ppi_version::BDFOY [requires] PeGS::PDF [requires] Perl::MinimumVersion::Fast [requires] PerlPowerTools [requires] Pod::InDesign::TaggedText [requires] Pod::InDesign::TaggedText::TPR [requires] Pod::Perldoc::ToToc [requires] Pod::PseudoPod::PerlTricks [requires] Pod::SpeakIt::MacSpeech [requires] Pod::WordML [requires] Psychic::Ninja [requires] ReturnValue [requires] SourceCode::LineCounter::Perl [requires] String::Sprintf [requires] Surveyor::App [requires] Surveyor::Benchmark::HTMLEntities [requires] Surveyor::Benchmark::SchwartzianTransform::SortFilesBySize [requires] Task::MasteringPerl [requires] Task::MojoLearningEnvironment [requires] Test::Env [requires] Test::HTTPStatus [requires] Test::ISBN [requires] Test::WWW::Accessibility [requires] Tie::BoundedInteger [requires] Tie::Cycle [requires] Tie::StringArray [requires] Tie::Timely [requires] Tie::Toggle [requires] Unicode::Support [requires] Unicode::Tussle [requires] WordPress::Grep [requires] github_creator [requires] perlbench [requires] scriptdist [requires] Running install for module 'App::scriptdist' The module App::scriptdist isn't available on CPAN. Either the module has not yet been uploaded to CPAN, or it is temporary unavailable. Please contact the author to find out more about the status. Try 'i App::scriptdist'. ^C I have no idea if this could be "BDFOY/Bundle-BDFOY-20160101"'s fault, or CPAN.pm, but I don't recall ever hitting this before - it isn't in my distroprefs.yml, and I've smoked a fair amount of cpan. Perl -V below: cpan2@digitalis:~$ install/bin/perl -V Summary of my perl5 (revision 5 version 26 subversion 0) configuration: Commit id: 2e3b2a1fba7611d1cd6060a5f07f6a0f91a06b3a Platform: osname=linux osvers=3.16.0-4-amd64 archname=x86_64-linux-thread-multi uname='linux digitalis 3.16.0-4-amd64 #1 smp debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 gnulinux ' config_args='-Dusedevel -DDEBUGGING -Dusethreads -Dprefix=/home/cpan2/install -Uversiononly -des' hint=recommended useposix=true d_sigaction=define useithreads=define usemultiplicity=define use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cc' ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2' optimize='-O2 -g' cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='' gccversion='4.9.2' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long' ivsize=8 nvtype='double' nvsize=8 Off_t='off_t' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='cc' ldflags =' -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64 libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.19.so so=so useshrplib=false libperl=libperl.a gnulibc_version='2.19' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags='-Wl,-E' cccdlflags='-fPIC' lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV PERL_TRACK_MEMPOOL PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under linux Compiled at Mar 26 2017 22:45:02 %ENV: PERL_USE_UNSAFE_INC="0" @INC: /home/cpan2/install/lib/perl5/site_perl/5.26.0/x86_64-linux-thread-multi /home/cpan2/install/lib/perl5/site_perl/5.26.0 /home/cpan2/install/lib/perl5/5.26.0/x86_64-linux-thread-multi /home/cpan2/install/lib/perl5/5.26.0 cpan2@digitalis:~$
Thanks for the report, this is interesting to try in the cpan shell directly: cpan[6]> install Task::BDFOY Running install for module 'Task::BDFOY' [...] The module App::scriptdist isn't available on CPAN. Either the module has not yet been uploaded to CPAN, or it is temporary unavailable. Please contact the author to find out more about the status. Try 'i App::scriptdist'. Deep recursion on subroutine "CPAN::Bundle::undelay" at /home/sand/src/perl/repoperls/installed-perls/host/k93jessie/v5.25.11/2397/lib/5.25.11/CPAN/Bundle.pm line 24. ^CSignal SIGINT received, but no signal handler set. Doing the same in the debugger leads to a halt: 997 levels deep in subroutine calls! Not yet sure where to fix this.
Even faster to reproduce:
Show quoted text
cpan> install Bundle::BDFOY
Subject: Re: [rt.cpan.org #120781] Memory leak or infinite loop while installing BDFOY/Bundle-BDFOY-20160101
Date: Wed, 29 Mar 2017 01:33:15 -0400
To: "bug-CPAN@rt.cpan.org" <bug-CPAN@rt.cpan.org>
From: brian d foy <bdfoy@cpan.org>
Wow, there are so many things wrong with App::scriptdist. It never declared a package name so there was nothing to index. I've fixed that and uploaded a new version. Sorry my problem led to this one.
Fixed in repository commit 16a8379c. Thanks for the report!


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.