Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

b9eeeef8c0 breaks Log::Trace and other modules #23015

Open
jkeenan opened this issue Feb 19, 2025 · 12 comments
Open

b9eeeef8c0 breaks Log::Trace and other modules #23015

jkeenan opened this issue Feb 19, 2025 · 12 comments
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)

Comments

@jkeenan
Copy link
Contributor

jkeenan commented Feb 19, 2025

Carlos Guevara has sent me a list of CPAN distributions which are failing tests against Perl 5 blead. I am trying to bisect these failures now. Since I suspect that more than one distribution will be broken by certain particular commits, I'm opening a separate ticket for each bad commit.

Log::Trace

Bisecting with this invocation:

$ perl Porting/bisect.pl \
--start=v5.41.8 \
--end=8d462f6a9e96adf5dac36c7e778468b78a47be96 \
--module=Log::Trace

... I got:

b9eeeef8c043fb0238a07e64636815bf327a6562 is the first bad commit
commit b9eeeef8c043fb0238a07e64636815bf327a6562
Author: Lukas Mai <l.mai@web.de>
Date:   Fri Feb 14 21:49:03 2025 +0100
Commit:     Lukas Mai <l.mai@web.de>
CommitDate: Sun Feb 16 01:42:36 2025 +0100

    op.c: re-enable coderef-in-stash optimization
    
    When seeing 'sub foo { ... }', perl does not need to allocate a full
    typeglob (with the subroutine being stored in the CODE slot). Instead,
    it can just store a coderef directly in the stash.

@mauke, please take a look.

For reference: The breaking commit was:

$ git describe
v5.41.8-98-gb9eeeef8c0

As I write this blead is at:

$ git describe
v5.41.8-119-g8d462f6a9e

Note: Right now the CPANtesters database is having difficulty receiving reports. So responding to BBC tickets is going to be more tedious than usual. See: https://www.nntp.perl.org/group/perl.cpan.testers.discuss/2025/02/msg4654.html.

@jkeenan jkeenan added BBC Blead Breaks CPAN - changes in blead broke a cpan module(s) Needs Triage labels Feb 19, 2025
@jkeenan
Copy link
Contributor Author

jkeenan commented Feb 19, 2025

foundation:

perl Porting/bisect.pl \
--start=7fdc8f34fd20e8d4bec8de19f64c869b152f1249 \
end=8d462f6a9e96adf5dac36c7e778468b78a47be96 \
--module=foundation
b9eeeef8c043fb0238a07e64636815bf327a6562 is the first bad commit
commit b9eeeef8c043fb0238a07e64636815bf327a6562
Author: Lukas Mai <lukasmai.403@gmail.com>
Date:   Fri Feb 14 21:49:03 2025 +0100

    op.c: re-enable coderef-in-stash optimization
    

@jkeenan jkeenan changed the title b9eeeef8c0 causes CPANtesters failures in Log::Trace and other modules b9eeeef8c0 breaks Log::Trace and other modules Feb 19, 2025
@jkeenan
Copy link
Contributor Author

jkeenan commented Feb 19, 2025

POE::Component::Basement:

perl Porting/bisect.pl \
--start=7fdc8f34fd20e8d4bec8de19f64c869b152f1249 \
end=8d462f6a9e96adf5dac36c7e778468b78a47be96 \
--module=POE::Component::Basement
b9eeeef8c043fb0238a07e64636815bf327a6562 is the first bad commit
commit b9eeeef8c043fb0238a07e64636815bf327a6562
Author: Lukas Mai <lukasmai.403@gmail.com>
Date:   Fri Feb 14 21:49:03 2025 +0100

    op.c: re-enable coderef-in-stash optimization

@jkeenan
Copy link
Contributor Author

jkeenan commented Feb 19, 2025

Prima:

http://www.cpantesters.org/cpan/report/758df122-eeb8-11ef-881f-a6c9b3d6a9e5

perl Porting/bisect.pl \
--start=7fdc8f34fd20e8d4bec8de19f64c869b152f1249 \
end=8d462f6a9e96adf5dac36c7e778468b78a47be96 \
--module=Prima

b9eeeef is the first bad commit
commit b9eeeef
Author: Lukas Mai l.mai@web.de
Date: Fri Feb 14 21:49:03 2025 +0100

op.c: re-enable coderef-in-stash optimization

@jkeenan
Copy link
Contributor Author

jkeenan commented Feb 19, 2025

Symbol::Get:

http://www.cpantesters.org/cpan/report/7c7a6254-eeb8-11ef-b0f7-f3945e623728

perl Porting/bisect.pl \
--start=7fdc8f34fd20e8d4bec8de19f64c869b152f1249 \
end=8d462f6a9e96adf5dac36c7e778468b78a47be96 \
--module=Symbol::Get
b9eeeef8c043fb0238a07e64636815bf327a6562 is the first bad commit
commit b9eeeef8c043fb0238a07e64636815bf327a6562
Author: Lukas Mai <lukasmai.403@gmail.com>
Date:   Fri Feb 14 21:49:03 2025 +0100

    op.c: re-enable coderef-in-stash optimization

@mauke, please take a look. Thanks.

@jkeenan
Copy link
Contributor Author

jkeenan commented Feb 19, 2025

Test::Sims:

http://www.cpantesters.org/cpan/report/85edc448-eeb8-11ef-a7c3-9ed74f0d3477

$ perl Porting/bisect.pl \
--start=7fdc8f34fd20e8d4bec8de19f64c869b152f1249 \
end=8d462f6a9e96adf5dac36c7e778468b78a47be96 \
--module=Test::Sims
b9eeeef8c043fb0238a07e64636815bf327a6562 is the first bad commit
commit b9eeeef8c043fb0238a07e64636815bf327a6562
Author: Lukas Mai <l.mai@web.de>
Date:   Fri Feb 14 21:49:03 2025 +0100

    op.c: re-enable coderef-in-stash optimization

@mauke
Copy link
Contributor

mauke commented Feb 19, 2025

Log::Trace has been broken for a long time; its tests just didn't notice. For example:

$ perl -we 'sub foo { 42 } use Log::Trace warn => {AllSubs => 1};'
Not a GLOB reference at /home/mauke/perl5/perlbrew/perls/perl-5.40.1/lib/site_perl/5.40.1/Log/Trace.pm line 273.
BEGIN failed--compilation aborted at -e line 1.
$ perl -we 'package Bar; use constant FOO => 42;  use Log::Trace warn => {AllSubs => 1};'
Not a GLOB reference at /home/mauke/perl5/perlbrew/perls/perl-5.40.1/lib/site_perl/5.40.1/Log/Trace.pm line 273.
BEGIN failed--compilation aborted at -e line 1.

A patch for these issues as well as the recent blead failures has been available in https://rt.cpan.org/Ticket/Display.html?id=49409 since 2017, courtesy of @cpansprout.

@mauke
Copy link
Contributor

mauke commented Feb 19, 2025

I'm not sure what to do about foundation. It looks unmaintained, the code is alpha quality, the POD contains errors, the name clashes with a system module on Mac OS (Foundation.pm), and the module is already broken:

$ perl -we '{ package Foo; use constant C => 42; } { package Bar; use foundation; foundation "Foo"; }'
Not a subroutine reference at /home/mauke/perl5/perlbrew/perls/perl-5.40.1/lib/site_perl/5.40.1/foundation.pm line 86.

I've submitted a bug report + patch at https://rt.cpan.org/Ticket/Display.html?id=159752.

@mauke
Copy link
Contributor

mauke commented Feb 19, 2025

POE::Component::Basement: bug report + patch at https://rt.cpan.org/Ticket/Display.html?id=159755

@mauke
Copy link
Contributor

mauke commented Feb 19, 2025

Test::Sims was theoretically fixed in 2018: schwern/Test-Sims#3
But the update was never released to CPAN.

@mauke
Copy link
Contributor

mauke commented Feb 20, 2025

I've reported the issue to Prima: dk/Prima#144 (including a patch that makes make test pass for me, but it needs review by someone more familiar with Perl or Prima internals)

@mauke
Copy link
Contributor

mauke commented Feb 20, 2025

I've reported the issue to Symbol::Get: FGasper/p5-Symbol-Get#4 (plus more general breakage that was not covered by tests)

@dk
Copy link

dk commented Feb 20, 2025

I've reported the issue to Prima: dk/Prima#144 (including a patch that makes make test pass for me, but it needs review by someone more familiar with Perl or Prima internals)

yes, but there's more: Prima uses GvCV(gv_fetchmeth) to get down to a CV, and with this new code, how one is supposed to get it? could there be some flags in the class that says build it the old way, through a GV?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BBC Blead Breaks CPAN - changes in blead broke a cpan module(s)
Projects
None yet
Development

No branches or pull requests

3 participants