Skip Menu |

This queue is for tickets about the Module-Info CPAN distribution.

Report information
The Basics
Id: 123352
Status: resolved
Priority: 0/
Queue: Module-Info

People
Owner: Nobody in particular
Requestors: john [...] genehack.org
Cc:
AdminCc:

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



Subject: fails tests with 5.27.5
Date: Sat, 21 Oct 2017 17:07:57 -0700
To: bug-Module-Info [...] rt.cpan.org
From: John SJ Anderson <john [...] genehack.org>
PERL_DL_NONLAZY=1 "/opt/plenv/versions/5.27.5/bin/perl5.27.5" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t B::Module::Info,modules_used use failed with 255 saying: require not bare 5.006 at line 3 use strict () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/lib/Module/Info.pm" line 4 use warnings () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/lib/Module/Info.pm" line 5 use Carp () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/lib/Module/Info.pm" line 6 use File::Spec () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/lib/Module/Info.pm" line 7 use Config () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/lib/Module/Info.pm" line 8 Undefined subroutine &B::LISTOP::name called at blib/lib/B/Module/Info.pm line 67. CHECK failed--call queue aborted. # Failed test (t/Module-Info.t at line 102) # got: '0' # expected: '7' # Failed test (t/Module-Info.t at line 103) # Structures begin differing at: # $got->[0] = Does not exist # $expected->[0] = 'Carp' B::Module::Info,modules_used use failed with 255 saying: use strict () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Foo.pm" line 3 use vars () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Foo.pm" line 6 use strict () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Foo.pm" line 26 use strict () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Foo.pm" line 37 require not bare 5.004 at line 46 require not bare 5 at line 48 use lib () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Foo.pm" line 49 require not bare t/lib/Bar.pm at line 64 Undefined subroutine &B::LISTOP::name called at blib/lib/B/Module/Info.pm line 67. CHECK failed--call queue aborted. # Failed test (t/Module-Info.t at line 204) # got: '0' # expected: '8' # Failed test (t/Module-Info.t at line 205) # Structures begin differing at: # $got->[0] = Does not exist # $expected->[0] = 'Carp' B::Module::Info,subs_called use failed with 255 saying: Can't locate object method "ARRAY" via package "B::NULL" at blib/lib/B/Module/Info.pm line 263. CHECK failed--call queue aborted. # Failed test (t/Module-Info.t at line 297) # Structures begin differing at: # $got->[0] = Does not exist # $expected->[0] = 'HASH(0x7fe19c069b40)' B::Module::Info,subs_called use failed with 255 saying: Can't locate object method "ARRAY" via package "B::NULL" at blib/lib/B/Module/Info.pm line 263. CHECK failed--call queue aborted. # Failed test (t/Module-Info.t at line 299) # Structures begin differing at: # $got->[0] = Does not exist # $expected->[0] = 'HASH(0x7fe19c06a290)' B::Module::Info,modules_used use failed with 255 saying: use Cwd () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Bar.pm" line 3 use Cwd (1) at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Bar.pm" line 4 use Cwd (1.00102) at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Bar.pm" line 5 use Cwd (v1.1.2) at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Bar.pm" line 6 require bare strict.pm at line 15 Undefined subroutine &B::LISTOP::isa called at /opt/plenv/versions/5.27.5/lib/perl5/site_perl/5.27.5/darwin-2level/B/Utils.pm line 669. CHECK failed--call queue aborted. # Failed test (t/Module-Info.t at line 304) # got: '0' # expected: '3' # Failed test (t/Module-Info.t at line 305) # Structures begin differing at: # $got->[0] = Does not exist # $expected->[0] = 'Carp' # Looks like you failed 8 tests of 59. t/Module-Info.t .......... Dubious, test returned 8 (wstat 2048, 0x800) Failed 8/59 subtests t/n0_die_on_error.t ...... ok B::Module::Info,modules_used use failed with 255 saying: use Cwd () at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Bar.pm" line 3 use Cwd (1) at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Bar.pm" line 4 use Cwd (1.00102) at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Bar.pm" line 5 use Cwd (v1.1.2) at "/Users/genehack/.cpanm/work/1508630030.13362/Module-Info-0.37/t/lib/Bar.pm" line 6 require bare strict.pm at line 15 Undefined subroutine &B::LISTOP::isa called at /opt/plenv/versions/5.27.5/lib/perl5/site_perl/5.27.5/darwin-2level/B/Utils.pm line 669. CHECK failed--call queue aborted. # Failed test (t/n1_modules_required.t at line 15) # Structures begin differing at: # $got->[0] = Does not exist # $expected->[0] = 'Carp' Can't use an undefined value as an ARRAY reference at t/n1_modules_required.t line 18. # Looks like you planned 3 tests but only ran 1. # Looks like your test died just after 1. t/n1_modules_required.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 3/3 subtests t/n2_safe.t .............. ok t/n3_version.t ........... ok t/zy_pod_coverage.t ...... skipped: these tests are for release candidate testing t/zz_pod.t ............... ok Test Summary Report ------------------- t/Module-Info.t (Wstat: 2048 Tests: 59 Failed: 8) Failed tests: 16-17, 52-53, 56-59 Non-zero exit status: 8 t/n1_modules_required.t (Wstat: 65280 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Parse errors: Bad plan. You planned 3 tests but ran 1. Files=7, Tests=111, 1 wallclock secs ( 0.04 usr 0.02 sys + 0.98 cusr 0.22 csys = 1.26 CPU) Result: FAIL Failed 2/7 test programs. 9/111 subtests failed. make: *** [test_dynamic] Error 255
RT-Send-CC: sprout [...] cpan.org
Bisect points to v5.27.4-55-g6a4fc5265b commit 6a4fc5265ba102bfd84de80bdb946121153387af Author: Father Chrysostomos <sprout@cpan.org> Date: Sun Sep 10 22:12:50 2017 -0700 B.pm: Remove unused var
Darn, scratch that. It's not reproducable.
On Sat Oct 21 23:47:48 2017, ANDK wrote: Show quoted text
> Darn, scratch that. It's not reproducable.
I see that it is calling all_roots from B::Utils and then taking references to subroutines whose names are in the hash, like this: \&$key B::Utils is returning names like B::LISTOP::name in the hash (there is no such subroutine), so taking a reference to it creates a stub and stops $listop->name from working. Do you get different test results with different B::Utils versions? I tested with 0.27.
On Sun Oct 22 23:27:42 2017, SPROUT wrote: Show quoted text
> On Sat Oct 21 23:47:48 2017, ANDK wrote:
> > Darn, scratch that. It's not reproducable.
> > I see that it is calling all_roots from B::Utils and then taking > references to subroutines whose names are in the hash, like this: > \&$key
I mean the hash returned by all_roots. Show quoted text
> > B::Utils is returning names like B::LISTOP::name in the hash (there is > no such subroutine), so taking a reference to it creates a stub and > stops $listop->name from working. > > Do you get different test results with different B::Utils versions? I > tested with 0.27.
My latest experiment showed that reverting v5.27.4-55-g6a4fc5265b and v5.27.4-69-g6077332135 fixes the problem. I tried that on top of v5.27.5-95-gd1589979b3. The reason why I said scratch that was because I got seemingly contradicting results due to a completely unrelated problem (with PERL_USE_UNSAFE_INC and Task::Weaken).
On Mon Oct 23 02:36:40 2017, ANDK wrote: Show quoted text
> My latest experiment showed that reverting v5.27.4-55-g6a4fc5265b and > v5.27.4-69-g6077332135 fixes the problem. I tried that on top of > v5.27.5-95-gd1589979b3. > > The reason why I said scratch that was because I got seemingly > contradicting results due to a completely unrelated problem (with > PERL_USE_UNSAFE_INC and Task::Weaken).
B::Utils does not take method caches into account. It returns not only the names of all subroutines, but also the names under which they have been cached as methods. It turns out that the dummy assignment in B::walksymtable, that appeared to be a useless line of code left over from refactoring, was actually doing something useful (clearing cached methods). It is perfectly reasonable to expect ->CV to point to something only if there is a real sub there (as opposed to a cached method), so I have restored this presumably accidental behaviour of B.pm and added a test, in perl commit 1cc318c. This ticket I think can be closed.