Skip Menu |
 

This queue is for tickets about the IO-Socket-SSL CPAN distribution.

Report information
The Basics
Id: 123201
Status: resolved
Priority: 0/
Queue: IO-Socket-SSL

People
Owner: Steffen_Ullrich [...] genua.de
Requestors: PLICEASE [...] cpan.org
Cc:
AdminCc:

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



Subject: Test failure with Visual C++ + Perl 5.26.1
Download (untitled) / with headers
text/plain 275b
I am seeing a failure in the t\connectSSL-timeout.t and t\npn.t tests with a Perl built with MS Visual C++ 14.1 64 bit. Here is a detailed log I managed to capture: https://gist.github.com/plicease/bcd1f68ed7187d5f07d938316e50141c I am also attaching the output of perl -V
Subject: perlv.txt
Download perlv.txt
text/plain 3.7k
Summary of my perl5 (revision 5 version 26 subversion 1) configuration: Derived from: Platform: osname=MSWin32 osvers=6.1 archname=MSWin32-x64-multi-thread uname='' config_args='undef' hint=recommended useposix=true d_sigaction=undef useithreads=define usemultiplicity=define use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cl' ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS' optimize='-O1 -MD -Zi -DNDEBUG -GL -fp:precise' cppflags='-DWIN32' ccversion='19.11.25508.2' gccversion='' gccosandvers='' intsize=4 longsize=4 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=undef longlongsize=8 d_longdbl=define longdblsize=8 longdblkind=0 ivtype='__int64' ivsize=8 nvtype='double' nvsize=8 Off_t='__int64' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='link' ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"n:\lang\perl\msvs\x64\5.26.1\lib\CORE" -machine:AMD64' libpth=N:\lang\msvs\2017\Community\VC\Tools\MSVC\14.11.25503\\lib\x64 libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib vcruntime.lib ucrt.lib perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib vcruntime.lib ucrt.lib libc=ucrt.lib so=dll useshrplib=true libperl=perl526.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs dlext=dll d_dlsymun=undef ccdlflags=' ' cccdlflags=' ' lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"n:\lang\perl\msvs\x64\5.26.1\lib\CORE" -machine:AMD64' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Locally applied patches: uncommitted-changes Built under MSWin32 Compiled at Oct 5 2017 10:02:13 %ENV: PERL5LIB="n:\home\ollisg\perl5\msvs\x64\5.26.1\lib\perl5" PERL_CPANM_OPT="--mirror http://mirror.sydney.wdlabs.com/cpan/ --mirror-only" PERL_LOCAL_LIB_ROOT="n:\home\ollisg\perl5\msvs\x64\5.26.1" PERL_MB_OPT="--install_base "n:\\home\\ollisg\\perl5\\msvs\\x64\\5.26.1"" PERL_MM_OPT="INSTALL_BASE=n:\\home\\ollisg\\perl5\\msvs\\x64\\5.26.1" PERL_PKG_CONFIG_SCRIPTS="pkg-config" @INC: n:\home\ollisg\perl5\msvs\x64\5.26.1\lib\perl5/5.26.1/MSWin32-x64-multi-thread n:\home\ollisg\perl5\msvs\x64\5.26.1\lib\perl5/5.26.1 n:\home\ollisg\perl5\msvs\x64\5.26.1\lib\perl5/MSWin32-x64-multi-thread n:\home\ollisg\perl5\msvs\x64\5.26.1\lib\perl5 N:/lang/perl/msvs/x64/5.26.1/lib
Download (untitled) / with headers
text/plain 986b
Am Do 05. Okt 2017, 16:48:30, PLICEASE schrieb: Show quoted text
> I am seeing a failure in the t\connectSSL-timeout.t and t\npn.t tests > with a Perl built with MS Visual C++ 14.1 64 bit. Here is a detailed > log I managed to capture: > > https://gist.github.com/plicease/bcd1f68ed7187d5f07d938316e50141c >
From the output of the tests: Show quoted text
> t\01loadmodule.t .................. # openssl version=0x20000000
It looks like you are using LibreSSL. I've got similar reports with OpenBSD since they simply disabled NPN support in LibreSSL without removing the functions, i.e. the functions claim to succeed but actually don't set the NPN extension :( That's why the t/npn.t tests fails. As for the t/connectSSL-timeout.t: could you please rerun the tests with verbosity or simply "perl -Mblib t/..." and provide the output. Also, can you verify that the tests fails reliably all the time? Windows is known to be flaky with nonblocking support and the timeout is implemented using nonblocking sockets.
Download (untitled) / with headers
text/plain 1.2k
On Sat Oct 21 15:11:13 2017, SULLR wrote: Show quoted text
> From the output of the tests:
> > t\01loadmodule.t .................. # openssl version=0x20000000
> > It looks like you are using LibreSSL. I've got similar reports with > OpenBSD since they simply disabled NPN support in LibreSSL without > removing the functions, i.e. the functions claim to succeed but > actually don't set the NPN extension :( That's why the t/npn.t tests > fails.
Ah, thanks for the info it looks as though this may be related to https://rt.cpan.org/Ticket/Display.html?id=122916 . I can for now patch my local copy of IO::Socket::SSL to set $can_npn to false. Or maybe install Net::SSLeay from subversion. Show quoted text
> As for the t/connectSSL-timeout.t: could you please rerun the tests > with verbosity or simply "perl -Mblib t/..." and provide the output. > Also, can you verify that the tests fails reliably all the time? > Windows is known to be flaky with nonblocking support and the timeout > is implemented using nonblocking sockets.
I just tried it a couple of times and timeout failure is indeed not reliable. Sometimes it blocks indefinitely. I ran both tests with verbose output after the full summary. You can see the results here: https://gist.github.com/plicease/bcd1f68ed7187d5f07d938316e50141c#file-gistfile1-txt-L149
Download (untitled) / with headers
text/plain 1.7k
Show quoted text
> Ah, thanks for the info it looks as though this may be related to > https://rt.cpan.org/Ticket/Display.html?id=122916 . I can for now > patch my local copy of IO::Socket::SSL to set $can_npn to false. Or > maybe install Net::SSLeay from subversion.
I've just released IO::Socket::SSL 2.052 which should work around this "feature" of LibreSSL of still implementing the functions related to NPN while removing the actual functionality from these functions. Hopefully the test will now detect that NPN is not supported. Show quoted text
>
> > As for the t/connectSSL-timeout.t: could you please rerun the tests > > with verbosity or simply "perl -Mblib t/..." and provide the output. > > Also, can you verify that the tests fails reliably all the time? > > Windows is known to be flaky with nonblocking support and the timeout > > is implemented using nonblocking sockets.
> > I just tried it a couple of times and timeout failure is indeed not > reliable. Sometimes it blocks indefinitely. I ran both tests with > verbose output after the full summary. You can see the results here: > > https://gist.github.com/plicease/bcd1f68ed7187d5f07d938316e50141c#file- > gistfile1-txt-L149
The verbose output says: Show quoted text
> not ok # An operation was attempted on something that is not a socket. at ./t/testlib.pl line 181.
The relevant part in testlib.pl is just trying to create a simple IO::Socket::INET listener and the error comes from inside IO::Socket::INET. I have no idea what is going on there internally in Windows. But again, Windows support seems to be flaky although it looks like the tests (which use fork) stress the Windows support more than production code. I will close the bug for now since the first problem should be solved and the second one seems to be outside IO::Socket::SSL.
Download (untitled) / with headers
text/plain 1.2k
On Sun Oct 22 04:57:43 2017, SULLR wrote: Show quoted text
> The relevant part in testlib.pl is just trying to create a simple > IO::Socket::INET listener and the error comes from inside > IO::Socket::INET. I have no idea what is going on there internally in > Windows. But again, Windows support seems to be flaky although it > looks like the tests (which use fork) stress the Windows support more > than production code. > > I will close the bug for now since the first problem should be solved > and the second one seems to be outside IO::Socket::SSL.
I did some more testing last night and the other test that uses fork_sub also fails intermittently. At least one of them fails most of the time. Given how unreliable these tests are under psudo-fork I do think it would be better to either rewrite the test so that it doesn't rely on fork, or to skip it on windows. I suppose failing that it would be helpful to either leave this bug open or have some documentation that these tests are expected to fail frequently on windows. It looks like Strawberry Perl just skips the tests for this module, which is unfortunately par for course for Strawberry :( https://metacpan.org/source/KMX/Perl-Dist-Strawberry-4.014/share/64bit-5.26.0.1.pp#L174


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.