Skip to content

BBC: b3f68b479c breaks combination of Tie::IxHash and YAML::PP #24302

Closed

Description

@jkeenan

Alerted by this report from @ericherman on the P5P list, I ran this bisection invocation just now on an unthreaded build on Linux:

perl Porting/bisect.pl \
--module=Tie::IxHash,YAML::PP \
--start=v5.43.8

This pointed to b3f68b4 as the first breaking commit:

b3f68b479c9876437620503fb7d54e14bceadcee is the first bad commit
commit b3f68b479c9876437620503fb7d54e14bceadcee
Author: Richard Leach <richardleach@users.noreply.github.com>
Date:   Thu Feb 5 00:01:10 2026 +0000
Commit:     Richard Leach <rich+perl@hyphen-dash-hyphen.info>
CommitDate: Tue Mar 10 23:46:51 2026 +0000

    Convert OP_CONST hash keys in key+val lists to HEKs
    
...

The breakage lies in YAML-PP's test suite:

Running make test for TINITA/YAML-PP-v0.39.0.tar.gz
PERL_DL_NONLAZY=1 "/home/jkeenan/testing/blead/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00.compile.t ............. ok     
t/10.parse-valid.t ......... 1/? # OK: 318 DIFF: 0 ERROR: 0 TODO: 0 SKIP: 8 
t/10.parse-valid.t ......... ok     
t/11.parse-invalid.t ....... 1/? # OK: 0 DIFF: 0 ERROR: 96 TODO: 0 SKIP: 5 
t/11.parse-invalid.t ....... ok     
t/12.load-json.t ........... 1/? # OK: 276 DIFF: 0 ERROR: 0 TODO: 0 SKIP: 8 
t/12.load-json.t ........... ok     
t/13.load-anchor.t ......... ok   
t/14.load-bool.t ........... ok    
t/15.parse-eol.t ........... ok    
t/16.loader.t .............. ok   
t/17.load-complex-keys.t ... ok   
t/18.control.t ............. ok    
t/19.file.t ................ ok   
t/20.dump.t ................ 306/? # OK: 311 DIFF: 0 ERROR: 0 TODO: 0 SKIP: 15 
t/20.dump.t ................ ok     
t/21.emit.t ................ 1/? # SAME_EVENTS: 283 SAME_YAML: 272 DIFF_EVENTS: 0 DIFF_YAML: 0 ERROR: 0 TODO: 0 SKIP: 43 
t/21.emit.t ................ ok     
t/22.dump-bool.t ........... ok    
t/23-dump-anchor.t ......... ok   
t/24.double-escapes.t ...... ok    
t/30.legacy.t .............. ok   
t/31.schema.t .............. 1/? # inf: Inf -inf: -Inf nan: NaN
t/31.schema.t .............. ok      
t/32.cyclic-refs.t ......... ok   
t/34.emit-scalar-styles.t .. ok   
t/35.highlight.t ........... ok   
t/36.debug.t ............... ok   
t/37.schema-catchall.t ..... ok   
t/37.schema-perl.t ......... # TEST QR: (?^:TEST_STRINGYFY_REGEX)
# QR PREFIX: (?^:
t/37.schema-perl.t ......... ok     
t/38.schema-ixhash.t ....... 1/? 
#   Failed test 'order: dump_string()'
#   at t/38.schema-ixhash.t line 30.
#          got: '---
# - &1
#   U: 2
#   B: 52
#   c: 64
#   '19': 84
#   Disco: 2000
#   Year: 2525
#   days_on_earth: 20000
# - *1
# '
#     expected: '---
# - &1
#   U: 2
#   B: 52
#   c: 64
#   19: 84
#   Disco: 2000
#   Year: 2525
#   days_on_earth: 20000
# - *1
# '

#   Failed test 'order_blessed: dump_string()'
#   at t/38.schema-ixhash.t line 30.
#          got: '---
# - &1 !perl/hash:Order
#   U: 2
#   B: 52
#   c: 64
#   '19': 84
#   Disco: 2000
#   Year: 2525
#   days_on_earth: 20000
# - *1
# '
#     expected: '---
# - &1 !perl/hash:Order
#   U: 2
#   B: 52
#   c: 64
#   19: 84
#   Disco: 2000
#   Year: 2525
#   days_on_earth: 20000
# - *1
# '
# Looks like you failed 2 tests of 2.
t/38.schema-ixhash.t ....... Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/2 subtests 
t/39.emitter-alias.t ....... ok   
t/40.representers.t ........ ok   
t/41.custom.schema.t ....... ok   
t/42.tokens.t .............. ok     
t/43.indent.t .............. 4/? # SAME_EVENTS: 837 SAME_YAML: 0 DIFF_EVENTS: 0 DIFF_YAML: 0 ERROR: 0 TODO: 0 SKIP: 141 
t/43.indent.t .............. ok   
t/44.writer.t .............. ok   
t/45.binary.t .............. ok   
t/46.line-endings.t ........ ok   
t/47.header-footer.t ....... ok   
t/48.merge.t ............... ok   
t/49.include.t ............. ok   
t/50.clone.t ............... ok   
t/51.directives.t .......... ok   
t/52.preserve.t ............ ok   
t/53.customtag-alias.t ..... ok   
t/54.glob.t ................ ok   
t/55.flow.t ................ YAML::PP::Test:216 $skipped = \{
               '87E4' => 1,
               '6BFJ' => 1,
               'CN3R' => 1,
               'LQZ7' => 1,
               'FRK4' => 1,
               'QF4Y' => 1,
               'LX3P' => 1,
               '4FJ6' => 1,
               '4ABK' => 1,
               'CT4Q' => 1,
               'CFD4' => 1,
               'L9U5' => 1,
               '8UDB' => 1,
               '9MMW' => 1,
               'Q9WF' => 1
             };
t/55.flow.t ................ 1/? # SAME_EVENTS: 15 SAME_YAML: 0 DIFF_EVENTS: 0 DIFF_YAML: 0 ERROR: 0 TODO: 0 SKIP: 3 
t/55.flow.t ................ ok    
t/56.force-flow.t .......... 78/? # SAME_EVENTS: 302 SAME_YAML: 0 DIFF_EVENTS: 0 DIFF_YAML: 0 ERROR: 0 TODO: 0 SKIP: 24 
t/56.force-flow.t .......... ok     
t/57.dup-keys.t ............ ok   

Test Summary Report
-------------------
t/38.schema-ixhash.t     (Wstat: 512 (exited 2) Tests: 2 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
Files=44, Tests=7466,  7 wallclock secs ( 0.26 usr  0.06 sys +  4.71 cusr  0.46 csys =  5.49 CPU)
Result: FAIL

Both Tie::IxHash and YAML::PP are non-core modules, but I have not yet analyzed their interrelationship with respect to these test failures.

@richardleach, can you take a look? Thanks.

Activity

  1. added
    BBCBlead Breaks CPAN - changes in blead broke a cpan module(s)
    on Mar 20, 2026
  2. jkeenan commented on Mar 20, 2026

    @jkeenan
    ContributorAuthor

    If we test Tie::IxHash and YAML::PP separately against blead, each PASSes.

    I bisected with these two invocations:

    perl Porting/bisect.pl \
    --module=YAML::PP \
    --start=905eb939405b3b851d49caa04a1cf0f9c0bbe751
    
    perl Porting/bisect.pl \
    --module=Tie::IxHash \
    --start=905eb939405b3b851d49caa04a1cf0f9c0bbe751
    

    In each case, I got Runner returned 0 for end revision at Porting/bisect.pl line 233. -- where the "end revision" is HEAD (2f3d9f5).

  3. self-assigned this
    on Mar 20, 2026
  4. richardleach commented on Mar 20, 2026

    @richardleach
    Contributor

    The difference seems to be '19': 84 vs 19: 84, which does reflect the SV being used as a hash key being hekified.
    Question is whether this is a functional bug or a more of a change to "dump()" output formatting. If it's the latter, options could include:

    • Updating the affected test files
    • Seeing whether instead of replacing the original IOK SV with a POK SV, the final SV is both IOK and POK, with flags indicating that the IOK was the original state. (I'm not sure offhand how much this will apply.)
    • Modifying S_check_alt_hash_fields_hekify to only hekify strings, not numbers (even though those numbers will be stringified when used as hash keys).
  5. richardleach commented on Mar 20, 2026

    @richardleach
    Contributor
    • Seeing whether instead of replacing the original IOK SV with a POK SV, the final SV is both IOK and POK, with flags indicating that the IOK was the original state. (I'm not sure offhand how much this will apply.)

    Made a start on exploring this option.

  6. book commented on Mar 20, 2026

    @book
    Contributor

    If we test Tie::IxHash and YAML::PP separately against blead, each PASSes.

    I believe this is because the YAML-PP test suite skips the specific test script that is failing is Tie-IxHash is not installed.

  7. richardleach commented on Mar 21, 2026

    @richardleach
    Contributor
    • Seeing whether instead of replacing the original IOK SV with a POK SV, the final SV is both IOK and POK, with flags indicating that the IOK was the original state. (I'm not sure offhand how much this will apply.)

    This seems to address the test failure in YAML::PP without that module needing to make any changes.

    I'm going to add a separate commit to #24290, since that's already touching the same code.

  8. jkeenan commented on Mar 21, 2026

    @jkeenan
    ContributorAuthor

    I spent a large part of today dealing with the fallout from the perl-5.43.9 release yesterday. I installed that release on both FreeBSD and Linux -- but in this post I will refer only to the CPANtesters results generated on Linux. The routine I use each month installs from the downloaded tarball (unthreaded on Linux), installs Task::CPAN::Reporter against that perl, then feeds a list of over 500 modules to ./bin/cpan. These modules are tested and (if PASSing) installed in dependency ("CPAN River") order. So Tie::IxHash gets tested and installed long before YAML::PP. But once the program records a failure in YAML::PP's t/38.schema-ixhash.t, that module does not get installed -- and all of its dependencies get discarded and no report for them is sent to cpantesters.org. Those modules include these:

    "Dist-Zilla"               => { version => 6.037 },
    "Inline-C"                 => { version => 0.82 },
    "Pegex"                    => { version => 0.75 },
    "Perl-Critic"              => { version => 1.156 },
    "Perl-PrereqScanner"       => { version => "1.100" },
    "Pod-Weaver"               => { version => "4.020" },
    "PPI"                      => { version => 1.284 },
    "PPI-HTML"                 => { version => 1.08 },
    "PPIx-QuoteLike"           => { version => 0.023 },
    "PPIx-Regexp"              => { version => 0.091 },
    "PPIx-Utilities"           => { version => "1.001000" },
    "PPIx-Utils"               => { version => 0.004 },
    "Test-Perl-Critic"         => { version => 1.04 },
    "XXX"                      => { version => 0.38 },
    

    But these distributions have hundreds of other CPAN distros dependent on them. @richardleach, in the development of your pull request you might wish to test at least the top-level of YAML::PP's reverse dependencies against your branch. You could try Test::Against::Commit to that end.

  9. richardleach commented on Mar 22, 2026

    @richardleach
    Contributor

    Thanks for all that effort, @jkeenan. I'll do some testing of the repos you have identified against #24290 later today.

  10. richardleach commented on Mar 22, 2026

    @richardleach
    Contributor

    "Dist-Zilla" => { version => 6.037 },
    "Inline-C" => { version => 0.82 },
    "Pegex" => { version => 0.75 },
    "Perl-Critic" => { version => 1.156 },
    "Perl-PrereqScanner" => { version => "1.100" },
    "Pod-Weaver" => { version => "4.020" },
    "PPI" => { version => 1.284 },
    "PPI-HTML" => { version => 1.08 },
    "PPIx-QuoteLike" => { version => 0.023 },
    "PPIx-Regexp" => { version => 0.091 },
    "PPIx-Utilities" => { version => "1.001000" },
    "PPIx-Utils" => { version => 0.004 },
    "Test-Perl-Critic" => { version => 1.04 },
    "XXX" => { version => 0.38 },

    All of these pass using #24290, with the dependency exception of Net::SSLeay, which had to be force installed. I'll look into that later today.

  11. richardleach commented on Mar 22, 2026

    @richardleach
    Contributor

    Same Net::SSLeay failures with blead, will try 5.43.9 next.

    t/local/32_x509_get_cert_info.t ............. 1/746 
    #   Failed test 'X509V3_EXT_print nid=103	extended-cert.cert.pem:4'
    #   at t/local/32_x509_get_cert_info.t line 273.
    #          got: 'Full Name:
    #   URI:http://intermediate-ca.net-ssleay.example/crl1.crl
    # 
    # Full Name:
    #   URI:http://intermediate-ca.net-ssleay.example/crl2.crl
    # '
    #     expected: 'Full Name:
    #   URI:http://intermediate-ca.net-ssleay.example/crl1.crl
    # Full Name:
    #   URI:http://intermediate-ca.net-ssleay.example/crl2.crl'
    
    #   Failed test 'X509V3_EXT_print nid=86	extended-cert.cert.pem:6'
    #   at t/local/32_x509_get_cert_info.t line 273.
    #          got: 'email:intermediate-ca@net-ssleay.example, URI:http://intermediate-ca.net-ssleay.example, DNS:intermediate-ca.net-ssleay.example, Registered ID:1.2.0.0, IP Address:192.168.0.1, IP Address:FD25:F814:AFB5:9873:0:0:0:1, othername: emailAddress:ica@net-ssleay.example'
    #     expected: 'email:intermediate-ca@net-ssleay.example, URI:http://intermediate-ca.net-ssleay.example, DNS:intermediate-ca.net-ssleay.example, Registered ID:1.2.0.0, IP Address:192.168.0.1, IP Address:FD25:F814:AFB5:9873:0:0:0:1, othername: emailAddress::ica@net-ssleay.example'
    
    #   Failed test 'X509V3_EXT_print nid=85	extended-cert.cert.pem:8'
    #   at t/local/32_x509_get_cert_info.t line 273.
    #          got: 'email:john.doe@net-ssleay.example, URI:http://johndoe.net-ssleay.example, DNS:johndoe.net-ssleay.example, Registered ID:1.2.3.4, IP Address:192.168.0.2, IP Address:FD25:F814:AFB5:9873:0:0:0:2, othername: emailAddress:jd@net-ssleay.example'
    #     expected: 'email:john.doe@net-ssleay.example, URI:http://johndoe.net-ssleay.example, DNS:johndoe.net-ssleay.example, Registered ID:1.2.3.4, IP Address:192.168.0.2, IP Address:FD25:F814:AFB5:9873:0:0:0:2, othername: emailAddress::jd@net-ssleay.example'
    # Looks like you failed 3 tests of 746.
    t/local/32_x509_get_cert_info.t ............. Dubious, test returned 3 (wstat 768, 0x300)
    
  12. jkeenan commented on Mar 22, 2026

    @jkeenan
    ContributorAuthor

    Here is a work-around for Net::SSLeay.

    • Build and install the perl against which you want to test. For me, recently, this has been a perl built from the perl-5.43.9.tar.gz. For you, it will probably be from your local branch in the p.r. you're testing. Let's call its top-level directory as: "$TESTINGDIR/perl-5.43.9".
    • Downloaded this trial release of Net-SSLeay which @karenetheridge uploaded a couple of weeks ago. Let's say I downloaded it to $DOWNLOADS_DIR. I then unpacked that tarball and cd-ed into it.
    • In that directory, I set up these envvars for that terminal:
    $ export THISDIR="$TESTINGDIR/perl-5.43.9"
    $ export THISPERL="$THISDIR/bin/perl -I$THISDIR/LIB"
    $ export THISPROVE="$THISDIR/bin/prove -I$THISDIR/LIB"
    $ export THISCPAN="$THISDIR/bin/cpan"
    
    • Called $THISCPAN to install the trial version of Net::SSLeay against the monthly dev release.
    • Called cd $THISDIR; ./bin/cpan Tie::IxHash YAML::PP Dist::Zilla

    YMMV.

  13. richardleach commented on Mar 22, 2026

    @richardleach
    Contributor

    Thanks, I mainly just wanted to check that Net::SSLeay's test failures were unrelated. (They definitely are.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BBCBlead Breaks CPAN - changes in blead broke a cpan module(s)Release Blocker

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions