noxxi / p5-io-socket-ssl

IO::Socket::SSL Perl Module
36 stars 59 forks source link

Two test failures on threaded debugging perl #119

Closed jkeenan closed 1 year ago

jkeenan commented 1 year ago

Today, in the course of investigating a bug report in the Perl 5 issue tracker, I tried to install Task::CPAN::Reporter against a threaded, debugging build of perl on FreeBSD-12 at commit https://github.com/Perl/perl5/commit/6760f691a95ab3a37fd59212795de2b1a7cf7888 (which was committed on Nov 01 2022). IO::Socket::SSL is a prerequisite for Task::CPAN::Reporter. Two tests in IO::Socket::SSL's test suite failed (with core dumps, apparently), thereby preventing installation of both IO::Socket::SSL and Task::CPAN::Reporter. I tried to install IO::Socket::SSL by itself but got the same test failures.

In the data below, $THISPERL and $THISPROVE are the perl and prove executables built at the aforementioned commit.

[perlmonger: IO-Socket-SSL-2.077-0] $ $THISPERL -V:config_args
config_args='-des -Dusedevel -Uversiononly -Dprefix=/home/jkeenan/testing/6760f691a9 -Dman1dir=none -Dman3dir=none -Duseithreads -Doptimize=-O2 -pipe -fstack-protector -fno-strict-aliasing -Duseithreads -DDEBUGGING';

[perlmonger: IO-Socket-SSL-2.077-0] $ $THISPROVE -vb t/public_suffix_lib_encode_idn.t 
t/public_suffix_lib_encode_idn.t .. Assertion failed: (!"UNREACHABLE"), function Perl_pp_leaveeval, file pp_ctl.c, line 4887.
No subtests run 

Test Summary Report
-------------------
t/public_suffix_lib_encode_idn.t (Wstat: 134 (Signal: ABRT, dumped core) Tests: 0 Failed: 0)
  Non-zero wait status: 134
  Parse errors: No plan found in TAP output
Files=1, Tests=0,  0 wallclock secs ( 0.05 usr  0.01 sys +  0.10 cusr  0.04 csys =  0.20 CPU)
Result: FAIL

[perlmonger: IO-Socket-SSL-2.077-0] $ $THISPROVE -vb t/public_suffix_lib_libidn.t
t/public_suffix_lib_libidn.t .. Assertion failed: (!"UNREACHABLE"), function Perl_pp_leaveeval, file pp_ctl.c, line 4887.
No subtests run 

Test Summary Report
-------------------
t/public_suffix_lib_libidn.t (Wstat: 134 (Signal: ABRT, dumped core) Tests: 0 Failed: 0)
  Non-zero wait status: 134
  Parse errors: No plan found in TAP output
Files=1, Tests=0,  0 wallclock secs ( 0.05 usr  0.02 sys +  0.09 cusr  0.02 csys =  0.18 CPU)
Result: FAIL

I subsequently built a non-debugging but threaded perl on the same machine (albeit at today's HEAD, b06fe7cd38) and IO::Socket::SSL tested and installed successfully. I then built a debugging but non-threaded perl at b06fe7cd38 at which IO::Socket::SSL tested and installed successfully. So the problem seems confined to builds on -Duseithreads -DDEBUGGING perls.

Since I don't customarily build debugging perls I don't know whether this problem is recent or ongoing. Can you investigate?

Thank you very much. Jim Keenan

jkeenan commented 1 year ago

I should add that what I'm attempting to install is IO-Socket-SSL-2.077. I located a threaded, debugging build of perl at tag v5.36.0 and was able to install this module against that perl.

demerphq commented 1 year ago

I doubt this ticket is IO-Socket-SSL specific, it is more likely a case of BBC. The code that broke for @jkeenan is new code that was added as part of the new feature module_true, and is more likely some unexpected optree configuration. I will investigate and report back.

Regarding the issue that @jkeenan mentioned he was investigating see also https://github.com/Perl/perl5/pull/20536 and https://github.com/Perl/perl5/pull/20535.

demerphq commented 1 year ago

@jkeenan can you try with blead please and not the commit you cited? I can't replicate the issue you reported. I think it might have been fixed in a subsequent patch already. IIRC we had to fixup a few things after the first merge of the module_true functionality.

perl -V
Summary of my perl5 (revision 5 version 37 subversion 7) configuration:
  Commit id: b06fe7cd385b906678c23d196beb73ae02812551
jkeenan commented 1 year ago

@jkeenan can you try with blead please and not the commit you cited? I can't replicate the issue you reported. I think it might have been fixed in a subsequent patch already. IIRC we had to fixup a few things after the first merge of the module_true functionality.

Yes, it appears to have been fixed already.

For the record, bisection pointed to this commit (as you expected) as the source of the breakage:

1102a6f006f2bb626d2c7f1c5b7d360c28518129 is the first bad commit
commit 1102a6f006f2bb626d2c7f1c5b7d360c28518129
Author: chromatic <chromatic@wgz.org>
Date:   Thu Oct 27 11:24:58 2022 +0200
Commit:     Yves Orton <demerphq@gmail.com>
CommitDate: Tue Nov 1 09:46:16 2022 +0100

    Enable `use feature 'module_true'

But at HEAD in blead, on a threaded debugging build, IO-Socket-SSL (and, by extension, Task-CPAN-Reporter) once again install.

[perlmonger: blead] $ ./bin/perl -v | head -2 | tail -1
This is perl 5, version 37, subversion 7 (v5.37.7 (v5.37.6-10-gb06fe7cd38)) built for amd64-freebsd-thread-multi

[perlmonger: blead] $ ./bin/perl -Ilib -V:config_args
config_args='-des -Dusedevel -Duseithreads -DDEBUGGING -Dprefix=/home/jkeenan/testing/blead -Uversiononly -Dman1dir=none -Dman3dir=none';

[perlmonger: blead] $ ./bin/perl -Ilib -MIO::Socket::SSL -MTask::CPAN::Reporter -E 'say $IO::Socket::SSL::VERSION; say $Task::CPAN::Reporter::VERSION;'
2.077
0.003

Problem resolved; closing ticket. Thank you very much.