Skip Menu |
 

This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id: 54919
Status: open
Priority: 0/
Queue: CPAN

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

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



MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1266963789-14816-246"
Content-Length: 0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 1740
Download (untitled) / with headers
text/plain 1.6k
Conversation on irc.perl.org: (#toolchain, IIRC) <DrHyde> klapperl: CPAN.pm can be astonishingly slow building Metadata on some of my testers, particularly the netbsd/alpha box, but i don't consider it to be a problem. if anyone thinks i should be outraged, i can time it if you like :-) <klapperl> if memory is low we need DBD::SQLite, this much is known; the other dangerous thing is to use YAML.pm instead of YAML::{XS,Syck} So I put in RT#54729 on Strawberry to remind myself to use YAML::XS [Alias' preference of the XS YAML modules] as the YAML reader for Strawberry. I changed the default settings that are put in place, and once I did that, I had this output the first time the build tried to execute a script against the new CPAN [when we try and get information on which modules need upgrading at the beginning, so this is before CPAN::SQLite is installed on Strawberry - the script in question is attached as cpan_string.pl, and the ftpstats.yml file is also attached.]: Loading CPAN... Loading Storable... CPAN::SQLite not installed, trying to work without Fetching with LWP: http://cpan.dagolden.com/authors/01mailrc.txt.gz Going to read 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz' ............................................................................DONE Fetching with LWP: http://cpan.dagolden.com/modules/02packages.details.txt.gz Alert: While trying to 'parse' YAML file 'C:\strawberry\cpan\FTPstats.yml' with 'YAML::XS' the following error was encountered: Usage: YAML::XS::LibYAML::Load(yaml_sv) at C:\strawberry\perl\vendor\lib/YAML/XS.pm line 70. Again, I'm not claiming that this is necessarily a bug in CPAN.pm, but it happens to be exposed by it. [It may be a bug in YAML::XS, after all.]
Subject: FTPstats.yml
MIME-Version: 1.0
Content-Type: application/octet-stream; name="FTPstats.yml"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="FTPstats.yml"
Content-Transfer-Encoding: base64
Content-Length: 292
Download FTPstats.yml
text/x-yaml 292b
--- history: - attempts: - method: dleasy start: 1266944578.59143 url: &1 !!perl/hash:CPAN::URL FROM: USER TEXT: http://cpan.dagolden.com/ end: 1266944580.86358 file: authors/01mailrc.txt.gz filesize: 166010 start: 1266944578.59031 thesiteurl: *1
Subject: cpan_string.pl
MIME-Version: 1.0
Content-Type: application/octet-stream; name="cpan_string.pl"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="cpan_string.pl"
Content-Transfer-Encoding: base64
Content-Length: 1592
Download cpan_string.pl
text/x-perl 1.5k
print "Loading CPAN...\n"; use CPAN; CPAN::HandleConfig->load unless $CPAN::Config_loaded++; $CPAN::Config->{'urllist'} = [ 'http://cpan.dagolden.com/' ]; print "Loading Storable...\n"; use Storable qw(nstore); my ($module, %seen, %need, @toget); my @modulelist = CPAN::Shell->expand('Module', '/./'); # Schwartzian transform from CPAN.pm. my @expand; @expand = map { $_->[1] } sort { $b->[0] <=> $a->[0] || $a->[1]{ID} cmp $b->[1]{ID}, } map { [$_->_is_representative_module, $_ ] } @modulelist; MODULE: for $module (@expand) { my $file = $module->cpan_file; # If there's no file to download, skip it. next MODULE unless defined $file; $file =~ s{^./../}{}; my $latest = $module->cpan_version; my $inst_file = $module->inst_file; my $have; my $next_MODULE; eval { # version.pm involved! if ($inst_file) { $have = $module->inst_version; local $^W = 0; ++$next_MODULE unless CPAN::Version->vgt($latest, $have); # to be pedantic we should probably say: # && !($have eq "undef" && $latest ne "undef" && $latest gt ""); # to catch the case where CPAN has a version 0 and we have a version undef } else { ++$next_MODULE; } }; next MODULE if $next_MODULE; if ($@) { next MODULE; } $seen{$file} ||= 0; next MODULE if $seen{$file}++; push @toget, $module; $need{$module->id}++; } unless (%need) { print "All modules are up to date\n"; } nstore \@toget, 'C:\tmp\output\cpan.info'; print "Completed collecting information on all modules\n"; exit 0;
MIME-Version: 1.0
Subject: YAML::XS is not called correctly when it is set to be the yaml_module.
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-14826-1266964211-477.54919-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 207
Download (untitled) / with headers
text/plain 207b
Oh. FYI: I install 1.94_56 as part of the "toolchain" (along with YAML::XS and about 25 other modules) before I make this call, but it's done via running "the mantra" through IPC::Run3, not by using CPAN.pm.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-14826-1266964211-477.54919-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
References: <rt-3.8.HEAD-14826-1266964211-477.54919-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1266968108-14812-244"
Message-ID: <rt-3.8.HEAD-14812-1266968108-16.54919-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 921
Download (untitled) / with headers
text/plain 921b
On Tue Feb 23 17:30:11 2010, CSJEWELL wrote: Show quoted text
> Oh. FYI: I install 1.94_56 as part of the "toolchain" (along with > YAML::XS and about 25 other modules) before I make this call, but it's > done via running "the mantra" through IPC::Run3, not by using CPAN.pm.
Incorrect information, sorry. It's 1.9402 at this point on 5.10.1. Apparently I install _56 a little later. (if it needed upgraded to 1.9402, it'd install 1.94_56 instead during the mantra stage. If not, 1.94_56 is installed along with the modules detected by this script.) But I have a "cut-and-paste" of a debugging session that I've attached here, for what it's worth, and I seem to have found the reason for the problem - the FTPstats.yml file didn't get written to until I had quit the debugger, so it was allocated but empty at the time of the LoadFile call. I don't know if the file write is something CPAN.pm can force or not, but that's the problem.
MIME-Version: 1.0
Subject: Debugging session.txt
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain; charset="utf-8"; name="Debugging session.txt"
Content-Disposition: inline; filename="Debugging session.txt"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 5426
C:\strawberry\perl\bin>perl -d c:\tmp\build\cpan_string.pl Loading DB routines from perl5db.pl version 1.32 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(c:\tmp\build\cpan_string.pl:1): 1: print "Loading CPAN...\n"; DB<1> c 10 Loading CPAN... Loading Storable... main::(c:\tmp\build\cpan_string.pl:10): 10: my @modulelist = CPAN::Shell->expand('Module', '/./'); DB<2> s CPAN::Shell::expand(C:\strawberry\perl\lib/CPAN/Shell.pm:1251): 1251: my $self = shift; DB<2> c 1288 CPAN::SQLite not installed, trying to work without CPAN::Shell::expand_by_method(C:\strawberry\perl\lib/CPAN/Shell.pm:1288): 1288: for $obj ( 1289: $CPAN::META->all_objects($class) 1290: ) { DB<3> s CPAN::all_objects(C:/strawberry/perl/lib/CPAN.pm:689): 689: my($mgr,$class) = @_; DB<3> c 692 CPAN::all_objects(C:/strawberry/perl/lib/CPAN.pm:692): 692: CPAN::Index->reload; DB<4> s CPAN::Index::reload(C:\strawberry\perl\lib/CPAN/Index.pm:42): 42: my($self,$force) = @_; DB<4> $CPAN::DEBUG=1 DB<5> c 84 CPAN::Index::reload(C:\strawberry\perl\lib/CPAN/Index.pm:84): 84: my $localized = $self->reload_x($remote, $localpath, $force) ; DB<6> n Fetching with LWP: http://cpan.dagolden.com/authors/01mailrc.txt.gz CPAN::Index::reload(C:\strawberry\perl\lib/CPAN/Index.pm:85): 85: $self->$reader($localized); # may die but we let the shell c atch it DB<6> c 84 Going to read 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz' ............................................................................DONE CPAN::Index::reload(C:\strawberry\perl\lib/CPAN/Index.pm:84): 84: my $localized = $self->reload_x($remote, $localpath, $force) ; DB<7> s CPAN::Index::reload_x(C:\strawberry\perl\lib/CPAN/Index.pm:206): 206: my($cl,$wanted,$localname,$force) = @_; DB<7> c 225 CPAN::Index::reload_x(C:\strawberry\perl\lib/CPAN/Index.pm:225): 225: return CPAN::FTP->localize($wanted,$abs_wanted,$force); DB<8> s CPAN::FTP::localize(C:\strawberry\perl\lib/CPAN/FTP.pm:271): 271: my($self,$file,$aslocal,$force) = @_; DB<8> c 468 Fetching with LWP: http://cpan.dagolden.com/modules/02packages.details.txt.gz CPAN::FTP::localize(C:\strawberry\perl\lib/CPAN/FTP.pm:468): 468: $self->_add_to_statistics($stats); DB<9> s CPAN::FTP::_add_to_statistics(C:\strawberry\perl\lib/CPAN/FTP.pm:79): 79: my($self,$stats) = @_; DB<9> c 90 CPAN::FTP::_add_to_statistics(C:\strawberry\perl\lib/CPAN/FTP.pm:90): 90: my $fullstats = $self->_ftp_statistics($fh); DB<10> s CPAN::FTP::_ftp_statistics(C:\strawberry\perl\lib/CPAN/FTP.pm:21): 21: my($self,$fh) = @_; DB<10> c 41 CPAN::FTP::_ftp_statistics(C:\strawberry\perl\lib/CPAN/FTP.pm:41): 41: my $stats = eval { CPAN->_yaml_loadfile($file); }; DB<11> x $file 0 'C:\\strawberry\\cpan\\FTPstats.yml' DB<12> x $CPAN::VERSION 0 1.9402 DB<13> s CPAN::FTP::_ftp_statistics(C:\strawberry\perl\lib/CPAN/FTP.pm:41): 41: my $stats = eval { CPAN->_yaml_loadfile($file); }; DB<13> s CPAN::_yaml_loadfile(C:/strawberry/perl/lib/CPAN.pm:546): 546: my($self,$local_file) = @_; DB<13> c 559 CPAN::_yaml_loadfile(C:/strawberry/perl/lib/CPAN.pm:559): 559: eval { @yaml = $code->($local_file); }; DB<14> x $code 0 CODE(0x206f804) -> &YAML::XS::LoadFile in C:\strawberry\perl\vendor\lib/YAML/XS.pm:60-71 DB<15> x $local_file 0 'C:\\strawberry\\cpan\\FTPstats.yml' DB<16> s CPAN::_yaml_loadfile(C:/strawberry/perl/lib/CPAN.pm:559): 559: eval { @yaml = $code->($local_file); }; DB<16> s YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/XS.pm:61): 61: my $IN; DB<16> n YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/XS.pm:62): 62: my $filename = shift; DB<16> n YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/XS.pm:63): 63: if (ref $filename eq 'GLOB') { DB<16> n YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/XS.pm:67): 67: open $IN, $filename 68: or die "Can't open '$filename' for input:\n$!"; DB<16> n YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/XS.pm:70): 70: return YAML::XS::LibYAML::Load(do { local $/; <$IN> }); DB<16> s YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/XS.pm:70): 70: return YAML::XS::LibYAML::Load(do { local $/; <$IN> }); DB<16> s YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/XS.pm:70): 70: return YAML::XS::LibYAML::Load(do { local $/; <$IN> }); DB<16> s CPAN::_yaml_loadfile(C:/strawberry/perl/lib/CPAN.pm:560): 560: if ($@) { DB<16> x $@ 0 'Usage: YAML::XS::LibYAML::Load(yaml_sv) at C:\\strawberry\\perl\\vendor\\lib /YAML/XS.pm line 70. ' DB<17> #################### At this point, the error has occured. I checked while I was still in the debugger and the FTPstats.yml file has 292 bytes allocated to it, but it is empty (which makes it understandable why it would blow up!) I hit 'q' and I get YAML content in the file... maybe either CPAN.pm or YAML::XS needs to flush writes?


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.