libwww-perl / LWP-Protocol-https

Provide https support for LWP::UserAgent
https://metacpan.org/pod/LWP::Protocol::https
Other
16 stars 35 forks source link

tests failed on install with cpanm #58

Open michael-stevens opened 3 years ago

michael-stevens commented 3 years ago

I initially reported this bug over on rt.cpan.org before finding a note in the Changes file that this is the recommended bug location. The metacpan.org page for this module links to rt so I thought it was the recommended location.

Hi,

I'm trying to install the module version 6.09 in perl on a newly setup centos 7 server. I get tests failed on install:

[root@cloud1 LWP-Protocol-https-6.09]# ls
blib  Changes  CONTRIBUTING.md  cpanfile  dist.ini  Install  lib  LICENSE  Makefile  Makefile.PL  MANIFEST  META.json  META.yml  MYMETA.json  MYMETA.yml  perlcriticrc  perltidyrc  pm_to_blib  t  tidyall.ini  xt
[root@cloud1 LWP-Protocol-https-6.09]# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-report-prereqs.t .. #
# Versions for all modules listed in MYMETA.json (including optional ones):
#
# === Configure Requires ===
#
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 6.68
#
# === Configure Suggests ===
#
#     Module      Want Have
#     -------- ------- ----
#     JSON::PP 2.27300 4.05
#
# === Build Requires ===
#
#     Module              Want Have
#     ------------------- ---- ----
#     ExtUtils::MakeMaker  any 6.68
#
# === Test Requires ===
#
#     Module                 Want     Have
#     ---------------------- ---- --------
#     ExtUtils::MakeMaker     any     6.68
#     File::Spec              any     3.40
#     File::Temp              any   0.2301
#     IO::Select              any     1.21
#     IO::Socket::INET        any     1.33
#     IO::Socket::SSL        1.54     1.94
#     IO::Socket::SSL::Utils  any     0.01
#     LWP::UserAgent         6.06     6.49
#     Socket                  any    2.030
#     Test::More              any 1.302183
#     Test::RequiresInternet  any     0.05
#     warnings                any     1.13
#
# === Test Recommends ===
#
#     Module         Want     Have
#     ---------- -------- --------
#     CPAN::Meta 2.120900 2.150010
#
# === Runtime Requires ===
#
#     Module                  Want     Have
#     ------------------- -------- --------
#     IO::Socket::SSL         1.54     1.94
#     LWP::Protocol::http      any     6.49
#     LWP::UserAgent          6.06     6.49
#     Mozilla::CA         20180117 20200520
#     Net::HTTPS                 6     6.19
#     base                     any     2.18
#     strict                   any     1.07
#
t/00-report-prereqs.t .. ok
t/apache.t .............
    #   Failed test 'have header Client-SSL-Version'
    #   at t/apache.t line 39.
    # Looks like you failed 1 test of 6.
t/apache.t ............. 1/2
#   Failed test 'Request GET https://www.apache.org'
#   at t/apache.t line 47.
# Looks like you failed 1 test of 2.
t/apache.t ............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
t/https_proxy.t ........ skipped: no recent version of IO::Socket::SSL::Utils
t/method_in_san.t ...... ok

Test Summary Report
-------------------
t/apache.t           (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=4, Tests=20,  1 wallclock secs ( 0.03 usr  0.01 sys +  0.57 cusr  0.10 csys =  0.71 CPU)
Result: FAIL
Failed 1/4 test programs. 1/20 subtests failed.
make: *** [test_dynamic] Error 255

Perl is:

[root@cloud1 LWP-Protocol-https-6.09]# perl -V
Summary of my perl5 (revision 5 version 16 subversion 3) configuration:

  Platform:
    osname=linux, osvers=3.10.0-957.1.3.el7.x86_64, archname=x86_64-linux-thread-multi
    uname='linux x86-02.bsys.centos.org 3.10.0-957.1.3.el7.x86_64 #1 smp thu nov 29 14:49:43 utc 2018 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -Dccdlflags=-Wl,--enable-new-dtags -Dlddlflags=-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -Wl,-z,relro  -DDEBUGGING=-g -Dversion=5.16.3 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl5 -Dsitearch=/usr/local/lib64/perl5 -Dprivlib=/usr/share/perl5 -Dvendorlib=/usr/share/perl5/vendor_perl -Darchlib=/usr/lib64/perl5 -Dvendorarch=/usr/lib64/perl5/vendor_perl -Darchname=x86_64-linux-thread-multi -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Duseshrplib -Dusethreads -Duseithreads -Dusedtrace=/usr/bin/dtrace -Duselargefiles -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin -Dusesitecustomize'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.8.5 20150623 (Red Hat 4.8.5-39)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -fstack-protector'
    libpth=/usr/local/lib64 /lib64 /usr/lib64
    libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
    perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.17'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro '

Characteristics of this binary (from libperl):
  Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
                        PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
                        PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL
                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                        USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
                        USE_REENTRANT_API USE_SITECUSTOMIZE
  Locally applied patches:
        Fedora Patch1: Removes date check, Fedora/RHEL specific
        Fedora Patch3: support for libdir64
        Fedora Patch4: use libresolv instead of libbind
        Fedora Patch5: USE_MM_LD_RUN_PATH
        Fedora Patch6: Skip hostname tests, due to builders not being network capable
        Fedora Patch7: Dont run one io test due to random builder failures
        Fedora Patch9: Fix find2perl to translate ? glob properly (RT#113054)
        Fedora Patch10: Fix broken atof (RT#109318)
        Fedora Patch13: Clear $@ before "do" I/O error (RT#113730)
        Fedora Patch14: Do not truncate syscall() return value to 32 bits (RT#113980)
        Fedora Patch15: Override the Pod::Simple::parse_file (CPANRT#77530)
        Fedora Patch16: Do not leak with attribute on my variable (RT#114764)
        Fedora Patch17: Allow operator after numeric keyword argument (RT#105924)
        Fedora Patch18: Extend stack in File::Glob::glob, (RT#114984)
        Fedora Patch19: Do not crash when vivifying $|
        Fedora Patch20: Fix misparsing of maketext strings (CVE-2012-6329)
        Fedora Patch21: Add NAME headings to CPAN modules (CPANRT#73396)
        Fedora Patch22: Fix leaking tied hashes (RT#107000) [1]
        Fedora Patch23: Fix leaking tied hashes (RT#107000) [2]
        Fedora Patch24: Fix leaking tied hashes (RT#107000) [3]
        Fedora Patch25: Fix dead lock in PerlIO after fork from thread (RT#106212)
        Fedora Patch26: Make regexp safe in a signal handler (RT#114878)
        Fedora Patch27: Update h2ph(1) documentation (RT#117647)
        Fedora Patch28: Update pod2html(1) documentation (RT#117623)
        Fedora Patch29: Document Math::BigInt::CalcEmu requires Math::BigInt (CPAN RT#85015)
        RHEL Patch30: Use stronger algorithm needed for FIPS in t/op/crypt.t (RT#121591)
        RHEL Patch31: Make *DBM_File desctructors thread-safe (RT#61912)
        RHEL Patch32: Use stronger algorithm needed for FIPS in t/op/taint.t (RT#123338)
        RHEL Patch33: Remove CPU-speed-sensitive test in Benchmark test
        RHEL Patch34: Make File::Glob work with threads again
        RHEL Patch35: Fix CRLF conversion in ASCII FTP upload (CPAN RT#41642)
        RHEL Patch36: Do not leak the temp utf8 copy of namepv (CPAN RT#123786)
        RHEL Patch37: Fix duplicating PerlIO::encoding when spawning threads (RT#31923)
        RHEL Patch38: Add SSL support to Net::SMTP (CPAN RT#93823) [1]
        RHEL Patch39: Add SSL support to Net::SMTP (CPAN RT#93823) [2]
        RHEL Patch40: Add SSL support to Net::SMTP (CPAN RT#93823) [3]
        RHEL Patch41: Add SSL support to Net::SMTP (CPAN RT#93823) [4]
        RHEL Patch42: Do not overload ".." in Math::BigInt (CPAN RT#80182)
        RHEL Patch43: Fix CVE-2018-18311 Integer overflow leading to buffer overflow
        RHEL Patch44: Fix a spurious timeout in Net::FTP::close (CPAN RT#18504)
  Built under linux
  Compiled at Apr  2 2020 01:18:37
  @INC:
    /usr/local/lib64/perl5
    /usr/local/share/perl5
    /usr/lib64/perl5/vendor_perl
    /usr/share/perl5/vendor_perl
    /usr/lib64/perl5
    /usr/share/perl5
    .
oalders commented 3 years ago

Would you be able to re-run the test with the following change and provide the output?

--- a/t/apache.t
+++ b/t/apache.t
@@ -17,6 +17,7 @@ subtest "Request GET $url" => sub {

     my $res = $ua->simple_request(HTTP::Request->new(GET => $url));
     ok($res->is_success, "success status");
+    diag $res->dump;

     my $h;
michael-stevens commented 3 years ago

Ok here's the new output:

t/apache.t .............     # HTTP/1.1 200 OK
    # Cache-Control: max-age=3600
    # Connection: close
    # Date: Fri, 30 Oct 2020 15:03:19 GMT
    # Accept-Ranges: bytes
    # ETag: "14aba-5b2e3f55dcb19"
    # Server: Apache
    # Vary: Accept-Encoding
    # Content-Length: 84666
    # Content-Type: text/html
    # Expires: Fri, 30 Oct 2020 16:03:19 GMT
    # Last-Modified: Fri, 30 Oct 2020 14:10:27 GMT
    # Client-Date: Fri, 30 Oct 2020 15:03:19 GMT
    # Client-Peer: 95.216.26.30:443
    # Client-Response-Num: 1
    # Client-SSL-Cert-Issuer: /C=GB/ST=Greater Manchester/L=Salford/O=Sectigo Limited/CN=Sectigo RSA Domain Validation Secure Server CA
    # Client-SSL-Cert-Subject: /OU=Domain Control Validated/OU=PositiveSSL Wildcard/CN=*.apache.org
    # Client-SSL-Cipher: ECDHE-RSA-AES256-GCM-SHA384
    # Client-SSL-Socket-Class: IO::Socket::SSL
    # Client-SSL-Warning: Peer certificate not verified
    # Link: </favicons/apple-touch-icon-57x57.png>; rel="apple-touch-icon"; sizes="57x57"
    # Link: </favicons/apple-touch-icon-60x60.png>; rel="apple-touch-icon"; sizes="60x60"
    # Link: </favicons/apple-touch-icon-72x72.png>; rel="apple-touch-icon"; sizes="72x72"
    # Link: </favicons/apple-touch-icon-76x76.png>; rel="apple-touch-icon"; sizes="76x76"
    # Link: </favicons/apple-touch-icon-114x114.png>; rel="apple-touch-icon"; sizes="114x114"
    # Link: </favicons/apple-touch-icon-120x120.png>; rel="apple-touch-icon"; sizes="120x120"
    # Link: </favicons/apple-touch-icon-144x144.png>; rel="apple-touch-icon"; sizes="144x144"
    # Link: </favicons/apple-touch-icon-152x152.png>; rel="apple-touch-icon"; sizes="152x152"
    # Link: </favicons/apple-touch-icon-180x180.png>; rel="apple-touch-icon"; sizes="180x180"
    # Link: </favicons/favicon-32x32.png>; rel="icon"; sizes="32x32"; type="image/png"
    # Link: </favicons/favicon-194x194.png>; rel="icon"; sizes="194x194"; type="image/png"
    # Link: </favicons/favicon-96x96.png>; rel="icon"; sizes="96x96"; type="image/png"
    # Link: </favicons/android-chrome-192x192.png>; rel="icon"; sizes="192x192"; type="image/png"
    # Link: </favicons/favicon-16x16.png>; rel="icon"; sizes="16x16"; type="image/png"
    # Link: </favicons/manifest.json>; rel="manifest"
    # Link: </favicons/favicon.ico>; rel="shortcut icon"
    # Link: <https://fonts.googleapis.com/css?family=Montserrat:300,600>; rel="stylesheet"
    # Link: </css/min.bootstrap.css>; rel="stylesheet"
    # Link: </css/styles.css>; rel="stylesheet"
    # Title: Welcome to The Apache Software Foundation!
    # X-Meta-Charset: utf-8
    # X-Meta-Description: Home page of The Apache Software Foundation
    # X-Meta-Msapplication-Config: /favicons/browserconfig.xml
    # X-Meta-Msapplication-TileColor: #603cba
    # X-Meta-Msapplication-TileImage: /favicons/mstile-144x144.png
    # X-Meta-Theme-Color: #282661
    # X-Meta-Viewport: width=device-width, initial-scale=1
    # X-UA-Compatible: IE=edge
    #
    # <!DOCTYPE html>
    # <html lang="en">
    # <head>
    #   <meta charset="utf-8">
    #   <meta http-equiv="X-UA-Compatible" content="IE=edge">
    #   <meta name="viewport" content="width=device-width, initial-scale=1">
    #   <meta name="description" content="Home page of The Apache Software Foundation">
    # \40\40
    #   <link rel="apple-touch-icon" sizes="57x57" href="/favicons/apple-touch-icon-57x57.png">
    #   <link rel="apple-touch-icon" sizes="60x60" href="/favicons/apple-touch-icon-60x60.png">
    #   <link rel="apple-touch-icon" sizes="72x72" href="/fav...
    # (+ 84154 more bytes not shown)

    #   Failed test 'have header Client-SSL-Version'
    #   at t/apache.t line 39.
    # Looks like you failed 1 test of 6.
t/apache.t ............. 1/2
#   Failed test 'Request GET https://www.apache.org'
#   at t/apache.t line 47.
# Looks like you failed 1 test of 2.
t/apache.t ............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
oalders commented 3 years ago

I've asked on IRC, but don't have any good help for you yet. You might be able to get some faster help on stackoverflow.com You could always ask there and post the link to this ticket so that we can see if you got the help you needed.

michael-stevens commented 3 years ago

I did a few hours of testing, it looks like the mostly likely variable is precisely which other modules I have installed, but I wasn't able to isolate the actual problem.