This queue is for tickets about the CPAN CPAN distribution.

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

People
Owner:
ANDK [...] cpan.org
Requestors:
adamk [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
1.87
Fixed in:
(no value)



Subject: Win32: Infinite loop in CPAN::Distrostatus::new
OK, I think I pretty much have all the Win32 bugs cleared that generate errors, so now it's on to the next stage of catching the things that don't generate errors. First up, an infinite loop while installing Bundle::CPAN. I'm afraid I can't tell you exactly which module it looped on, but I did manage to load up DProf and do a trace, then extract via -T. While running the cpan shell from my normal home directory using: C:\Documents and Settings\adam>cpan CPAN: File::HomeDir loaded ok Use of uninitialized value in concatenation (.) or string at c:/vanilla-perl/perl/site/lib/Term/ReadLine/readline.pm line 1330. cpan shell -- CPAN exploration and modules installation (v1.87) ReadLine support enabled SetConsoleMode failed, LastError=|6| at c:/vanilla-perl/perl/site/lib/Term/ReadKey.pm line 265.
Show quoted text
cpan> install Bundle::CPAN
(300 lines of stuff). ---------------------------------------------------- So having had tmon.out bloat out to 178 meg before I killed it, the point at which the problem starts looks like this: (snipped 150,000 lines) + 190 - 190 - 197 - 192 - 2d0 & 32c CPAN::Distribution _make_command + 32c - 32c @ 0 0 7813 + cc + cd - cd - cc + 2ad - 2ad - 1c4 / 1c4 / 1c4 / 1c4 (snipped 17,150,000 lines, all / 1c4 with intermittant timestamps) / 1c4 + & Devel::DProf::write @ 15 0 16 - & Devel::DProf::write at which point I hard-killed it via the task manager. --------------------------------------------------------------- Dumped out via -T that gets us: (snipped 75,000 lines) CPAN::Module::uptodate CPAN::Module::cpan_version CPAN::InfoObj::ro CPAN::Module::inst_file File::Spec::Win32::catfile File::Spec::Win32::canonpath File::Spec::Win32::catdir File::Spec::Win32::canonpath CPAN::Module::inst_version CPAN::Module::inst_file File::Spec::Win32::catfile File::Spec::Win32::canonpath File::Spec::Win32::catdir File::Spec::Win32::canonpath ExtUtils::MM_Unix::parse_version ExtUtils::MakeMaker::_version::BEGIN strict::unimport IO::Handle::DESTROY CPAN::Version::readable CPAN::Version::vgt CPAN::Version::vcmp CPAN::Distribution::_make_command CPAN::Shell::myprint CPAN::Shell::print_ornamented CPAN::Distrostatus::new Garbled profile, missing an enter time stamp at c:\vanilla-perl\perl\bin/dprofpp.bat line 829, <fh> line 152601. Those last two lines are from STDERR, not STDOUT. ----------------------------------------------------------- So, on to diagnosis. The entire package consists of only: package CPAN::Distrostatus; use overload '""' => "as_string", fallback => 1; sub new { my($class,$arg) = @_; bless { TEXT => $arg, FAILED => substr($arg,0,2) eq "NO", COMMANDID => $CPAN::CurrentCommandId, }, $class; } sub commandid { shift->{COMMANDID} } sub failed { shift->{FAILED} } sub text { my($self,$set) = @_; if (defined $set) { $self->{TEXT} = $set; } $self->{TEXT}; } sub as_string { my($self) = @_; $self->text; } There's nothing obvious in there that looks like it would infinite loop... although having fallback => 1 might open it up to potential trouble. I'm afraid I got nothing more for you at this point. Once I fix the larger Module::Signature problem I'll revisit this.
When I see 'endless loop' I think of a wonderful bugfix in 1.88_51. AUTOLOAD now has a recursion stopper that was missing all the years and who knows, maybe this bug is now also fixed. I leave it open though. Just wanted to let you know.
Closing now due to no new evidence. Thanks,


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.