Subject: | CPAN shell hangs reading JSON files |
If I have many unpacked distributions in .cpan/build, CPAN sometimes hangs with 100% CPU
usage after showing the list of dependencies.
cpan shell -- CPAN exploration and modules installation (v1.9800)
Enter 'h' for help.
Show quoted text
cpan> test Dist::Zilla::PluginBundle::AVAR
Reading '/Users/sprout/.cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.045)
CPAN: YAML loaded ok (v0.78)
Reading 224 yaml files from /Users/sprout/.cpan/build/
CPAN: Time::HiRes loaded ok (v1.9724)
..........................................................................DONE
Restored the state of 182 (in 5.2685 secs)
............................................................................DONE
Reading '/Users/sprout/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Sat, 28 Jan 2012 23:12:06 GMT
HTTP::Date not available
............................................................................DONE
Reading '/Users/sprout/.cpan/sources/modules/03modlist.data.gz'
............................................................................DONE
Running test for module 'Dist::Zilla::PluginBundle::AVAR'
Running make for H/HI/HINRIK/Dist-Zilla-PluginBundle-AVAR-0.26.tar.gz
CPAN: Parse::CPAN::Meta loaded ok (v1.4401)
CPAN: CPAN::Meta loaded ok (v2.113640)
CPAN: Module::CoreList loaded ok (v2.60)
CPAN.pm: Building H/HI/HINRIK/Dist-Zilla-PluginBundle-AVAR-0.26.tar.gz
Warning: prerequisite Dist::Zilla 1.092990 not found.
Warning: prerequisite Dist::Zilla::Plugin::Authority 0 not found.
Warning: prerequisite Dist::Zilla::Plugin::CompileTests 0 not found.
Warning: prerequisite Dist::Zilla::Plugin::MakeMaker::Awesome 0 not found.
Warning: prerequisite Dist::Zilla::Plugin::MetaNoIndex 0 not found.
Warning: prerequisite Dist::Zilla::Plugin::ReadmeFromPod 0.06 not found.
Warning: prerequisite Dist::Zilla::PluginBundle::Filter 0 not found.
Warning: prerequisite Dist::Zilla::PluginBundle::Git 1.102810 not found.
Warning: prerequisite Dist::Zilla::Role::PluginBundle 0 not found.
Writing Makefile for Dist::Zilla::PluginBundle::AVAR
Writing MYMETA.yml and MYMETA.json
Show quoted text---- Unsatisfied dependencies detected during ----
---- HINRIK/Dist-Zilla-PluginBundle-AVAR-0.26.tar.gz ----
Dist::Zilla::Role::PluginBundle [requires]
Dist::Zilla::Plugin::CompileTests [requires]
Dist::Zilla::Plugin::MakeMaker::Awesome [requires]
Dist::Zilla::Plugin::Authority [requires]
Dist::Zilla::Plugin::ReadmeFromPod [requires]
Dist::Zilla::PluginBundle::Filter [requires]
Dist::Zilla [requires]
Dist::Zilla::Plugin::MetaNoIndex [requires]
Dist::Zilla::PluginBundle::Git [requires]
Could not read metadata file. Falling back to other methods to determine prerequisites
If I attach to it with gdb and use ‘call Perl_warn(my_perl,"aaa")’, it shows a line number
somewhere in JSON::PP. Continuing (the ‘c’ command) and then interrupting (ctrl-C) from
time to time will sometimes show calls to perl’s internal utf8 functions that are fed strings of
JSON that I can find in various unpacked distributions.
So apparently CPAN.pm is parsing a lot of META.json or MYMETA.json files in all these
directories. I can’t understand why it would need to do that. Whether it is doing it in some
specific order and will actually finish, or whether it is stuck in a loop, I have not been able to
determine.