Bug#1014293: libcpan-reporter-smoker-perl: FTBFS with Perl 5.36: tries to smoke the whole CPAN during build

gregor herrmann gregoa at debian.org
Sun Jul 3 17:38:22 BST 2022


On Sun, 03 Jul 2022 17:15:50 +0300, Niko Tyni wrote:

> This package fails to build from source with Perl 5.36 (currently in
> experimental.)
> 
> Build log at
> 
>   http://perl.debian.net/rebuild-logs/perl-5.36-throwaway/libcpan-reporter-smoker-perl_0.29-2/libcpan-reporter-smoker-perl_0.29-2_amd64-2022-06-13T03:37:58Z.build
> 
> It looks like the build times out because the test suite
> tries to test the whole CPAN. I believe this is because
> of the recent mitigations for CPAN checksums vulnerabilities.

This is interesting: In this log, t/parse_module_index.t finishes and
then there is no trace of any of the t/smoke-*.t tests.

In my local perl 5.36 chroot this looks different:

#v+
# Looks like your test exited with 2 just after 3.
t/smoke-all.t ........... 
1..5
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/5 subtests 
# Looks like your test exited with 2 just after 3.
t/smoke-disabled.t ...... 
1..5
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/5 subtests 

#   Failed test 'Number of reports in history'
#   at t/smoke-list-array.t line 60.
#          got: '0'
#     expected: '2'
# Looks like you failed 1 test of 6.
t/smoke-list-array.t .... 
1..6
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
ok 4 - Finished simulated smoke testing
ok 5 - require CPAN::Reporter::History;
not ok 6 - Number of reports in history
Lockfile removed.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/6 subtests 

#   Failed test 'Number of reports in history'
#   at t/smoke-list-file.t line 57.
#          got: '0'
#     expected: '2'
# Looks like you failed 1 test of 6.
t/smoke-list-file.t ..... 
1..6
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
ok 4 - Finished simulated smoke testing
ok 5 - require CPAN::Reporter::History;
not ok 6 - Number of reports in history
Lockfile removed.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/6 subtests 
# Looks like your test exited with 2 just after 3.
t/smoke-restart.t ....... 
1..6
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
Dubious, test returned 2 (wstat 512, 0x200)
Failed 3/6 subtests 

#   Failed test 'Number of reports in history'
#   at t/smoke-reverse.t line 63.
#          got: '0'
#     expected: '2'
# Looks like you failed 1 test of 7.
t/smoke-reverse.t ....... 
1..7
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
ok 4 - Finished simulated smoke testing
ok 5 - saw dists in correct order
ok 6 - require CPAN::Reporter::History;
not ok 7 - Number of reports in history
Lockfile removed.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/7 subtests 

Test Summary Report
-------------------
t/smoke-all.t         (Wstat: 512 (exited 2) Tests: 3 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 5 tests but ran 3.
t/smoke-disabled.t    (Wstat: 512 (exited 2) Tests: 3 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 5 tests but ran 3.
t/smoke-list-array.t  (Wstat: 256 (exited 1) Tests: 6 Failed: 1)
  Failed test:  6
  Non-zero exit status: 1
t/smoke-list-file.t   (Wstat: 256 (exited 1) Tests: 6 Failed: 1)
  Failed test:  6
  Non-zero exit status: 1
t/smoke-restart.t     (Wstat: 512 (exited 2) Tests: 3 Failed: 0)
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 6 tests but ran 3.
t/smoke-reverse.t     (Wstat: 256 (exited 1) Tests: 7 Failed: 1)
  Failed test:  7
  Non-zero exit status: 1
Files=10, Tests=88,  4 wallclock secs ( 0.03 usr  0.02 sys +  3.22 cusr  0.40 csys =  3.67 CPU)
Result: FAIL
#v-
 
>   http://blogs.perl.org/users/neilb/2021/11/addressing-cpan-vulnerabilities-related-to-checksums.html
> 
>    [CPAN.pm 2.29] now ignores any previously configured urllist and only
>    uses cpan.org. If you want it to honour the urllist parameter instead,
>    you must set the new pushy_https parameter to false.
> 
> I assume but haven't tested that setting pushy_https => 0 in
> t/data/MyConfig.pm will fix this.

With this change, the tests still fail under 5.36 (but pass with perl
5.34), but differently:

#v+
#   Failed test 'Number of reports in history'
#   at t/smoke-all.t line 47.
#          got: '0'
#     expected: '6'
# Looks like you failed 1 test of 5.
t/smoke-all.t ........... 
1..5
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
ok 4 - require CPAN::Reporter::History;
not ok 5 - Number of reports in history
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests 

#   Failed test 'Number of reports in history'
#   at t/smoke-disabled.t line 54.
#          got: '0'
#     expected: '1'
# Looks like you failed 1 test of 5.
t/smoke-disabled.t ...... 
1..5
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
ok 4 - require CPAN::Reporter::History;
not ok 5 - Number of reports in history
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests 

#   Failed test 'Number of reports in history'
#   at t/smoke-list-array.t line 60.
#          got: '0'
#     expected: '2'
# Looks like you failed 1 test of 6.
t/smoke-list-array.t .... 
1..6
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
ok 4 - Finished simulated smoke testing
ok 5 - require CPAN::Reporter::History;
not ok 6 - Number of reports in history
Lockfile removed.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/6 subtests 

#   Failed test 'Number of reports in history'
#   at t/smoke-list-file.t line 57.
#          got: '0'
#     expected: '2'
# Looks like you failed 1 test of 6.
t/smoke-list-file.t ..... 
1..6
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
ok 4 - Finished simulated smoke testing
ok 5 - require CPAN::Reporter::History;
not ok 6 - Number of reports in history
Lockfile removed.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/6 subtests 

#   Failed test 'Number of reports in history'
#   at t/smoke-restart.t line 49.
#          got: '0'
#     expected: '6'
# Looks like you failed 1 test of 6.
t/smoke-restart.t ....... 
1..6
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
ok 4 - require CPAN::Reporter::History;
not ok 5 - Number of reports in history
ok 6 - Looped more than once due to restart delay
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/6 subtests 

#   Failed test 'saw dists in correct order'
#   at t/smoke-reverse.t line 59.
#                   'Starting CPAN::Reporter::Smoker
# CPAN: YAML loaded ok (v1.30)
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/authors/01mailrc.txt.gz'
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/02packages.details.txt.gz'
#   Database was generated on Tue, 03 Feb 1970 03:17:06 GMT
#   HTTP::Date not available
# Warning: This index file is 19143 days old.
#   Please check the host you chose as your CPAN mirror for staleness.
#   I'll continue but problems seem likely to happen.
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/03modlist.data.gz'
# ............................................................................DONE
# Writing /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata
# Scanning cache /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/build for sizes
# DONE
# 
# 
# Smoker: testing Bogus-Fail-0.01 [1/2] at Sun Jul  3 16:12:06 2022
# 
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata'
# Warning: Found only 23 objects in /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata
# CPAN: YAML loaded ok (v1.30)
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/authors/01mailrc.txt.gz'
# CPAN: File::Which loaded ok (v1.27)
# CPAN: Compress::Zlib loaded ok (v2.106)
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/02packages.details.txt.gz'
#   Database was generated on Tue, 03 Feb 1970 03:17:06 GMT
#   HTTP::Date not available
# Warning: This index file is 19143 days old.
#   Please check the host you chose as your CPAN mirror for staleness.
#   I'll continue but problems seem likely to happen.
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/03modlist.data.gz'
# ............................................................................DONE
# Writing /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata
# CPAN: Digest::SHA loaded ok (v6.02)
# 
# Warning: checksum file '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/authors/id/D/DA/DAGOLDEN/CHECKSUMS' not conforming.
# 
# The cksum does not contain the key 'cpan_path' for 'Bogus-Fail-0.01.tar.gz'.
# Proceed nonetheless? [no] no
# Aborted.
# 
# 
# Smoker: testing Bogus-Pass-0.01 [2/2] at Sun Jul  3 16:12:06 2022
# 
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata'
# Warning: Found only 23 objects in /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata
# CPAN: YAML loaded ok (v1.30)
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/authors/01mailrc.txt.gz'
# CPAN: File::Which loaded ok (v1.27)
# CPAN: Compress::Zlib loaded ok (v2.106)
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/02packages.details.txt.gz'
#   Database was generated on Tue, 03 Feb 1970 03:17:06 GMT
#   HTTP::Date not available
# Warning: This index file is 19143 days old.
#   Please check the host you chose as your CPAN mirror for staleness.
#   I'll continue but problems seem likely to happen.
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/03modlist.data.gz'
# ............................................................................DONE
# Writing /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata
# CPAN: Digest::SHA loaded ok (v6.02)
# 
# Warning: checksum file '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/authors/id/D/DA/DAGOLDEN/CHECKSUMS' not conforming.
# 
# The cksum does not contain the key 'cpan_path' for 'Bogus-Pass-0.01.tar.gz'.
# Proceed nonetheless? [no] no
# Aborted.
# '
#     doesn't match '(?^ms:DAGOLDEN\/Bogus\-Fail\-0\.01\.tar\.gz.+?DAGOLDEN\/Bogus\-Pass\-0\.01\.tar\.gz)'
# Starting CPAN::Reporter::Smoker
# CPAN: YAML loaded ok (v1.30)
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/authors/01mailrc.txt.gz'
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/02packages.details.txt.gz'
#   Database was generated on Tue, 03 Feb 1970 03:17:06 GMT
#   HTTP::Date not available
# Warning: This index file is 19143 days old.
#   Please check the host you chose as your CPAN mirror for staleness.
#   I'll continue but problems seem likely to happen.
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/03modlist.data.gz'
# ............................................................................DONE
# Writing /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata
# Scanning cache /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/build for sizes
# DONE
# 
# 
# Smoker: testing Bogus-Fail-0.01 [1/2] at Sun Jul  3 16:12:06 2022
# 
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata'
# Warning: Found only 23 objects in /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata
# CPAN: YAML loaded ok (v1.30)
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/authors/01mailrc.txt.gz'
# CPAN: File::Which loaded ok (v1.27)
# CPAN: Compress::Zlib loaded ok (v2.106)
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/02packages.details.txt.gz'
#   Database was generated on Tue, 03 Feb 1970 03:17:06 GMT
#   HTTP::Date not available
# Warning: This index file is 19143 days old.
#   Please check the host you chose as your CPAN mirror for staleness.
#   I'll continue but problems seem likely to happen.
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/03modlist.data.gz'
# ............................................................................DONE
# Writing /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata
# CPAN: Digest::SHA loaded ok (v6.02)
# 
# Warning: checksum file '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/authors/id/D/DA/DAGOLDEN/CHECKSUMS' not conforming.
# 
# The cksum does not contain the key 'cpan_path' for 'Bogus-Fail-0.01.tar.gz'.
# Proceed nonetheless? [no] no
# Aborted.
# 
# 
# Smoker: testing Bogus-Pass-0.01 [2/2] at Sun Jul  3 16:12:06 2022
# 
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata'
# Warning: Found only 23 objects in /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata
# CPAN: YAML loaded ok (v1.30)
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/authors/01mailrc.txt.gz'
# CPAN: File::Which loaded ok (v1.27)
# CPAN: Compress::Zlib loaded ok (v2.106)
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/02packages.details.txt.gz'
#   Database was generated on Tue, 03 Feb 1970 03:17:06 GMT
#   HTTP::Date not available
# Warning: This index file is 19143 days old.
#   Please check the host you chose as your CPAN mirror for staleness.
#   I'll continue but problems seem likely to happen.
# ............................................................................DONE
# Reading '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/modules/03modlist.data.gz'
# ............................................................................DONE
# Writing /build/libcpan-reporter-smoker-perl-0.29/t/dot-cpan4148646/Metadata
# CPAN: Digest::SHA loaded ok (v6.02)
# 
# Warning: checksum file '/build/libcpan-reporter-smoker-perl-0.29/t/CPAN/authors/id/D/DA/DAGOLDEN/CHECKSUMS' not conforming.
# 
# The cksum does not contain the key 'cpan_path' for 'Bogus-Pass-0.01.tar.gz'.
# Proceed nonetheless? [no] no
# Aborted.

#   Failed test 'Number of reports in history'
#   at t/smoke-reverse.t line 63.
#          got: '0'
#     expected: '2'
# Looks like you failed 2 tests of 7.
t/smoke-reverse.t ....... 
1..7
ok 1 - require CPAN::Reporter::Smoker;
ok 2 - CPAN::Reporter::Smoker->can('start')
ok 3 - Starting simulated smoke testing
ok 4 - Finished simulated smoke testing
not ok 5 - saw dists in correct order
ok 6 - require CPAN::Reporter::History;
not ok 7 - Number of reports in history
Lockfile removed.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/7 subtests 

Test Summary Report
-------------------
t/smoke-all.t         (Wstat: 256 (exited 1) Tests: 5 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
t/smoke-disabled.t    (Wstat: 256 (exited 1) Tests: 5 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
t/smoke-list-array.t  (Wstat: 256 (exited 1) Tests: 6 Failed: 1)
  Failed test:  6
  Non-zero exit status: 1
t/smoke-list-file.t   (Wstat: 256 (exited 1) Tests: 6 Failed: 1)
  Failed test:  6
  Non-zero exit status: 1
t/smoke-restart.t     (Wstat: 256 (exited 1) Tests: 6 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
t/smoke-reverse.t     (Wstat: 512 (exited 2) Tests: 7 Failed: 2)
  Failed tests:  5, 7
  Non-zero exit status: 2
Files=10, Tests=95, 10 wallclock secs ( 0.05 usr  0.00 sys +  9.36 cusr  0.79 csys = 10.20 CPU)
Result: FAIL
#v-

A little investigation (running with PERL_AUTHOR_TESTING=1) shows
that the less verbose failures are also about the checksum issue.

As for cpan_path, https://grep.metacpan.org/search?qd=CPAN&source=metacpan&q=cpan_path
looks helpful. So let's try this with our CHECKSUM files …

And *drumroll* it works :)

Patch committed and pushed but not forwared yet (and not uploaded),
as I'm a bit confused by the fact that my original failures were
different. Hence I'd like to have some review/test by another pair of
eyes.


Cheers,
gregor


-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: Digital Signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-perl-maintainers/attachments/20220703/53b45650/attachment-0001.sig>


More information about the pkg-perl-maintainers mailing list