Skip to content

ext/POSIX/t/math.t failure #17033

Closed
Closed

Description

@p5pRT

Migrated from rt.perl.org#134171 (status was 'resolved')

Searchable as RT134171$

Activity

  1. p5pRT commented on Jun 3, 2019

    @p5pRT
    Author

    From rares.aioanei@gmail.com

    Created by rares.aioanei@gmail.com

    Subject​: ext/POSIX/t/math.t failure
    Message-Id​: <5.30.0_11724_1559578277@​openindiana>
    From​: rares.aioanei@​gmail.com
    Reply-To​: rares.aioanei@​gmail.com
    Cc​: arares@​openindiana.local
    To​: perlbug@​perl.org

    This is a bug report for perl from rares.aioanei@​gmail.com,
    generated with the help of perlbug 1.41 running under perl 5.30.0.

    -----------------------------------------------------------------
    ext/POSIX/t/math.t fails on Solaris (OpenIndiana Hipster) with :

    # Failed test 'tanh(-1)'
    # at t/math.t line 55.
    # '0.761594155955765'
    # <=
    # '-0.76'

    # Failed test 'tanh(1) == -tanh(-1)'
    # at t/math.t line 56.
    # got​: 0.761594155955765
    # expected​: -0.761594155955765

    Perl Info
    
    Flags:
        category=core
        severity=low
    
    Site configuration information for perl 5.30.0:
    
    Configured by arares at Mon Jun  3 17:59:03 EEST 2019.
    
    Summary of my perl5 (revision 5 version 30 subversion 0) configuration:
    
      Platform:
        osname=solaris
        osvers=2.11
        archname=i86pc-solaris
        uname='sunos openindiana 5.11 illumos-ffec1fd1b2 i86pc i386 i86pc '
        config_args=''
        hint=recommended
        useposix=true
        d_sigaction=define
        useithreads=undef
        usemultiplicity=undef
        use64bitint=undef
        use64bitall=undef
        uselongdouble=undef
        usemymalloc=n
        default_inc_excludes_dot=define
        bincompat5005=undef
      Compiler:
        cc='gcc'
        ccflags ='-fwrapv -fno-strict-aliasing -pipe
    -fstack-protector-strong -I/usr/gnu/include -D_LARGEFILE_SOURCE
    -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV'
        optimize='-O'
        cppflags='-fwrapv -fno-strict-aliasing -pipe
    -fstack-protector-strong -I/usr/gnu/include'
        ccversion=''
        gccversion='6.5.0'
        gccosandvers=''
        intsize=4
        longsize=4
        ptrsize=4
        doublesize=8
        byteorder=1234
        doublekind=3
        d_longlong=define
        longlongsize=8
        d_longdbl=define
        longdblsize=12
        longdblkind=3
        ivtype='long'
        ivsize=4
        nvtype='double'
        nvsize=8
        Off_t='off_t'
        lseeksize=8
        alignbytes=4
        prototype=define
      Linker and Libraries:
        ld='gcc'
        ldflags =' -fstack-protector-strong -L/usr/gnu/lib '
        libpth=/usr/gcc/6/lib /usr/lib /usr/gnu/lib /usr/ccs/lib
        libs=-lpthread -lsocket -lnsl -lgdbm -ldb -ldl -lm -lc
        perllibs=-lpthread -lsocket -lnsl -ldl -lm -lc
        libc=/lib/libc.so
        so=so
        useshrplib=true
        libperl=libperl.so
        gnulibc_version=''
      Dynamic Linking:
        dlsrc=dl_dlopen.xs
        dlext=so
        d_dlsymun=undef
        ccdlflags='  -R /opt/lib/perl5/5.30.0/i86pc-solaris/CORE'
        cccdlflags='-fPIC'
        lddlflags='-shared -L/usr/gnu/lib -fstack-protector-strong'
    
    
    
    @INC for perl 5.30.0:
        /opt/lib/perl5/site_perl/5.30.0/i86pc-solaris
        /opt/lib/perl5/site_perl/5.30.0
        /opt/lib/perl5/5.30.0/i86pc-solaris
        /opt/lib/perl5/5.30.0
    
    
    Environment for perl 5.30.0:
        HOME=/export/home/arares
        LANG=en_US.UTF-8
        LANGUAGE (unset)
        LD_LIBRARY_PATH (unset)
        LOGDIR (unset)
        PATH=/usr/bin:/usr/sbin:/sbin:/usr/gnu/bin
        PERL_BADLANG (unset)
        SHELL=/bin/bash
    
    
  2. p5pRT commented on Jun 3, 2019

    @p5pRT
    Author

    From @jkeenan

    On Mon, 03 Jun 2019 19​:18​:10 GMT, rares.aioanei@​gmail.com wrote​:

    Subject​: ext/POSIX/t/math.t failure
    Message-Id​: <5.30.0_11724_1559578277@​openindiana>
    From​: rares.aioanei@​gmail.com
    Reply-To​: rares.aioanei@​gmail.com
    Cc​: arares@​openindiana.local
    To​: perlbug@​perl.org

    This is a bug report for perl from rares.aioanei@​gmail.com,
    generated with the help of perlbug 1.41 running under perl 5.30.0.

    -----------------------------------------------------------------
    ext/POSIX/t/math.t fails on Solaris (OpenIndiana Hipster) with :

    # Failed test 'tanh(-1)'
    # at t/math.t line 55.
    # '0.761594155955765'
    # <=
    # '-0.76'

    # Failed test 'tanh(1) == -tanh(-1)'
    # at t/math.t line 56.
    # got​: 0.761594155955765
    # expected​: -0.761594155955765

    Are you in a position to run a test where you add the following option to Perl's ./Configure program?

    #####
    -Duse64bitall
    #####

    That is, configure and build like this​:

    #####
    sh ./Configure -des -Dusedevel -Duse64bitall && make test_prep
    #####

    ... and then run​:

    #####
    cd t;./perl harness -v ../ext/POSIX/t/math.t;cd -
    #####

    I ask, because if the test in question PASSes when perl is configured with '-Duse64bitall', that would be consistent with some smoke test reports we have been receiving, e.g.,

    http​://perl5.test-smoke.org/report/88747
    http​://perl5.test-smoke.org/report/88826

    Unfortunately, while we have been receiving these smoke-test reports, we haven't been in position to fully diagnose this on Solaris.

    Thank you very much.

    --
    James E Keenan (jkeenan@​cpan.org)

  3. p5pRT commented on Jun 3, 2019

    @p5pRT
    Author

    The RT System itself - Status changed from 'new' to 'open'

  4. p5pRT commented on Jun 4, 2019

    @p5pRT
    Author

    From @sisyphus

    That is, configure and build like this​:

    #####
    sh ./Configure -des -Dusedevel -Duse64bitall && make test_prep
    #####

    ... and then run​:

    #####
    cd t;./perl harness -v ../ext/POSIX/t/math.t;cd -
    #####

    To the OP​:
    If you're able to do that, and it fixes the problem, could you also provide the 'perl -V' output for this new build.

    Also (as a stab in the dark), on your first build, could you confirm that tanh(-1) and tanh(-1.0) are both returning the same incorrect value of 0.761594155955765.
    The value should be -0.761594155955765.

    Cheers,
    Rob

  5. p5pRT commented on Jun 7, 2019

    @p5pRT
    Author

    From rares.aioanei@gmail.com

    On Mon, 03 Jun 2019 18​:16​:09 -0700, sisyphus@​cpan.org wrote​:

    That is, configure and build like this​:

    #####
    sh ./Configure -des -Dusedevel -Duse64bitall && make test_prep
    #####

    ... and then run​:

    #####
    cd t;./perl harness -v ../ext/POSIX/t/math.t;cd -
    #####

    To the OP​:
    If you're able to do that, and it fixes the problem, could you also
    provide the 'perl -V' output for this new build.

    Also (as a stab in the dark), on your first build, could you confirm
    that tanh(-1) and tanh(-1.0) are both returning the same incorrect
    value of 0.761594155955765.
    The value should be -0.761594155955765.

    Cheers,
    Rob

    Attached is the output of 'perl -V' as requested. 'make test' succeeds and both calls to tanh() return the same value, the one you predicted. Please let me know if there is anything else or if you need testing on Solaris in the future.

  6. p5pRT commented on Jun 7, 2019

    @p5pRT
    Author
  7. p5pRT commented on Jun 7, 2019

    @p5pRT
    Author

    From @sisyphus

    On Fri, 07 Jun 2019 06​:39​:03 -0700, rares.aioanei@​gmail.com wrote​:

    Attached is the output of 'perl -V' as requested. 'make test' succeeds
    and both calls to tanh() return the same value, the one you predicted.
    Please let me know if there is anything else or if you need testing on
    Solaris in the future.

    We can see from that 'perl -V' output that the "-Duse64bitall" argument puts the C compiler into 64 bit mode.
    It therefore appears that, although the 32 bit mode of tanh() is buggy, the 64 bit mode works correctly.

    Should we consider providing a fix/workaround for the 32 bit mode calculation ?
    I don't know ... I would simply offer the advice "configure your perl build with -Duse64bitall" and leave it at that, but others might consider that to be inadequate ....

    Cheers,
    Rob

  8. p5pRT commented on Jun 7, 2019

    @p5pRT
    Author

    From rares.aioanei@gmail.com

    On Fri, 07 Jun 2019 07​:15​:21 -0700, sisyphus@​cpan.org wrote​:

    On Fri, 07 Jun 2019 06​:39​:03 -0700, rares.aioanei@​gmail.com wrote​:

    Attached is the output of 'perl -V' as requested. 'make test'
    succeeds
    and both calls to tanh() return the same value, the one you
    predicted.
    Please let me know if there is anything else or if you need testing
    on
    Solaris in the future.

    We can see from that 'perl -V' output that the "-Duse64bitall"
    argument puts the C compiler into 64 bit mode.
    It therefore appears that, although the 32 bit mode of tanh() is
    buggy, the 64 bit mode works correctly.

    Should we consider providing a fix/workaround for the 32 bit mode
    calculation ?
    I don't know ... I would simply offer the advice "configure your perl
    build with -Duse64bitall" and leave it at that, but others might
    consider that to be inadequate ....

    Cheers,
    Rob

    Just a side norte here....the perl compiled with '-Duse64bitall' returns the same values when calling tanh() as the 32-bit one does, although the math.t test fails only with the 32-bit one.

  9. p5pRT commented on Jun 7, 2019

    @p5pRT
    Author

    From @jkeenan

    On Fri, 07 Jun 2019 14​:15​:21 GMT, sisyphus@​cpan.org wrote​:

    On Fri, 07 Jun 2019 06​:39​:03 -0700, rares.aioanei@​gmail.com wrote​:

    Attached is the output of 'perl -V' as requested. 'make test'
    succeeds
    and both calls to tanh() return the same value, the one you
    predicted.
    Please let me know if there is anything else or if you need testing
    on
    Solaris in the future.

    We can see from that 'perl -V' output that the "-Duse64bitall"
    argument puts the C compiler into 64 bit mode.
    It therefore appears that, although the 32 bit mode of tanh() is
    buggy, the 64 bit mode works correctly.

    Should we consider providing a fix/workaround for the 32 bit mode
    calculation ?
    I don't know ... I would simply offer the advice "configure your perl
    build with -Duse64bitall" and leave it at that, but others might
    consider that to be inadequate ....

    Cheers,
    Rob

    One possible approach​: revise hints/solaris_2.sh. The string 'use64bitall' already occurs within that (and other) hints files.

    --
    James E Keenan (jkeenan@​cpan.org)

  10. p5pRT commented on Jun 11, 2019

    @p5pRT
    Author

    From rares.aioanei@gmail.com

    Yes, they return the same value. And here's the output of perl -V :

    Summary of my perl5 (revision 5 version 30 subversion 0) configuration​:

      Platform​:
      osname=solaris
      osvers=2.11
      archname=i86pc-solaris
      uname='sunos openindiana 5.11 illumos-ffec1fd1b2 i86pc i386 i86pc '
      config_args=''
      hint=recommended
      useposix=true
      d_sigaction=define
      useithreads=undef
      usemultiplicity=undef
      use64bitint=undef
      use64bitall=undef
      uselongdouble=undef
      usemymalloc=n
      default_inc_excludes_dot=define
      bincompat5005=undef
      Compiler​:
      cc='gcc'
      ccflags ='-fwrapv -fno-strict-aliasing -pipe
    -fstack-protector-strong -I/usr/gnu/include -D_LARGEFILE_SOURCE
    -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV'
      optimize='-O'
      cppflags='-fwrapv -fno-strict-aliasing -pipe
    -fstack-protector-strong -I/usr/gnu/include'
      ccversion=''
      gccversion='6.5.0'
      gccosandvers=''
      intsize=4
      longsize=4
      ptrsize=4
      doublesize=8
      byteorder=1234
      doublekind=3
      d_longlong=define
      longlongsize=8
      d_longdbl=define
      longdblsize=12
      longdblkind=3
      ivtype='long'
      ivsize=4
      nvtype='double'
      nvsize=8
      Off_t='off_t'
      lseeksize=8
      alignbytes=4
      prototype=define
      Linker and Libraries​:
      ld='gcc'
      ldflags =' -fstack-protector-strong -L/usr/gnu/lib '
      libpth=/usr/gcc/6/lib /usr/lib /usr/gnu/lib /usr/ccs/lib
      libs=-lpthread -lsocket -lnsl -lgdbm -ldb -ldl -lm -lc
      perllibs=-lpthread -lsocket -lnsl -ldl -lm -lc
      libc=/lib/libc.so
      so=so
      useshrplib=true
      libperl=libperl.so
      gnulibc_version=''
      Dynamic Linking​:
      dlsrc=dl_dlopen.xs
      dlext=so
      d_dlsymun=undef
      ccdlflags=' -R /opt/lib/perl5/5.30.0/i86pc-solaris/CORE'
      cccdlflags='-fPIC'
      lddlflags='-shared -L/usr/gnu/lib -fstack-protector-strong'

    Characteristics of this binary (from libperl)​:
      Compile-time options​:
      HAS_TIMES
      PERLIO_LAYERS
      PERL_COPY_ON_WRITE
      PERL_DONT_CREATE_GVSV
      PERL_MALLOC_WRAP
      PERL_OP_PARENT
      PERL_PRESERVE_IVUV
      PERL_USE_SAFE_PUTENV
      USE_LARGE_FILES
      USE_LOCALE
      USE_LOCALE_COLLATE
      USE_LOCALE_CTYPE
      USE_LOCALE_NUMERIC
      USE_LOCALE_TIME
      USE_PERLIO
      USE_PERL_ATOF
      Built under solaris
      Compiled at Jun 3 2019 18​:02​:06
      @​INC​:
      /opt/lib/perl5/site_perl/5.30.0/i86pc-solaris
      /opt/lib/perl5/site_perl/5.30.0
      /opt/lib/perl5/5.30.0/i86pc-solaris
      /opt/lib/perl5/5.30.0

    On Tue, Jun 4, 2019 at 4​:16 AM sisyphus@​cpan.org via RT
    <perlbug-followup@​perl.org> wrote​:

    That is, configure and build like this​:

    #####
    sh ./Configure -des -Dusedevel -Duse64bitall && make test_prep
    #####

    ... and then run​:

    #####
    cd t;./perl harness -v ../ext/POSIX/t/math.t;cd -
    #####

    To the OP​:
    If you're able to do that, and it fixes the problem, could you also provide the 'perl -V' output for this new build.

    Also (as a stab in the dark), on your first build, could you confirm that tanh(-1) and tanh(-1.0) are both returning the same incorrect value of 0.761594155955765.
    The value should be -0.761594155955765.

    Cheers,
    Rob

  11. p5pRT commented on Aug 1, 2019

    @p5pRT
    Author

    From @tonycoz

    On Mon, 03 Jun 2019 12​:18​:10 -0700, rares.aioanei@​gmail.com wrote​:

    ext/POSIX/t/math.t fails on Solaris (OpenIndiana Hipster) with :

    # Failed test 'tanh(-1)'
    # at t/math.t line 55.
    # '0.761594155955765'
    # <=
    # '-0.76'

    # Failed test 'tanh(1) == -tanh(-1)'
    # at t/math.t line 56.
    # got​: 0.761594155955765
    # expected​: -0.761594155955765

    This looks like it's caused by​:

    https://www.illumos.org/issues/11175

    and my illumos-2d6125aab2 system passes these tests when built without -Duse64bitint.

    Tony

  12. p5pRT commented on Aug 3, 2019

    @p5pRT
    Author

    From @jkeenan

    On Thu, 01 Aug 2019 04​:12​:36 GMT, tonyc wrote​:

    On Mon, 03 Jun 2019 12​:18​:10 -0700, rares.aioanei@​gmail.com wrote​:

    ext/POSIX/t/math.t fails on Solaris (OpenIndiana Hipster) with :

    # Failed test 'tanh(-1)'
    # at t/math.t line 55.
    # '0.761594155955765'
    # <=
    # '-0.76'

    # Failed test 'tanh(1) == -tanh(-1)'
    # at t/math.t line 56.
    # got​: 0.761594155955765
    # expected​: -0.761594155955765

    This looks like it's caused by​:

    https://www.illumos.org/issues/11175

    and my illumos-2d6125aab2 system passes these tests when built without
    -Duse64bitint.

    Tony

    Will we have to wait for a new release of Illumos in order to close this ticket?

    Thank you very much.
    --
    James E Keenan (jkeenan@​cpan.org)

  13. p5pRT commented on Aug 5, 2019

    @p5pRT
    Author

    From @tonycoz

    On Fri, 02 Aug 2019 18​:43​:48 -0700, jkeenan wrote​:

    On Thu, 01 Aug 2019 04​:12​:36 GMT, tonyc wrote​:

    On Mon, 03 Jun 2019 12​:18​:10 -0700, rares.aioanei@​gmail.com wrote​:

    ext/POSIX/t/math.t fails on Solaris (OpenIndiana Hipster) with :

    # Failed test 'tanh(-1)'
    # at t/math.t line 55.
    # '0.761594155955765'
    # <=
    # '-0.76'

    # Failed test 'tanh(1) == -tanh(-1)'
    # at t/math.t line 56.
    # got​: 0.761594155955765
    # expected​: -0.761594155955765

    This looks like it's caused by​:

    https://www.illumos.org/issues/11175

    and my illumos-2d6125aab2 system passes these tests when built
    without
    -Duse64bitint.

    Tony

    Will we have to wait for a new release of Illumos in order to close
    this ticket?

    Thank you very much.

    The OP appears to be running a development release of OpenIndiana.

    2019.04 has illumos at git commit a547acf91a[1], Sun Apr 28 18​:59​:18 2019 +0000.

    The OP's uname string indicates they have a later prerelease ffec1fd1b2, Thu May 9 17​:19​:27 2019 +0000.

    The release I downloaded, which includes the fix is dated Sat Jun 22 10​:26​:20 2019 +0300.

    I expect the OP could already update to fix the issue.

    Tony

    [1] https://wiki.openindiana.org/oi/2019.04+Release+notes

  14. p5pRT commented on Sep 6, 2019

    @p5pRT
    Author

    From @tonycoz

    On Sun, 04 Aug 2019 18​:01​:16 -0700, tonyc wrote​:

    On Fri, 02 Aug 2019 18​:43​:48 -0700, jkeenan wrote​:

    On Thu, 01 Aug 2019 04​:12​:36 GMT, tonyc wrote​:

    On Mon, 03 Jun 2019 12​:18​:10 -0700, rares.aioanei@​gmail.com wrote​:

    ext/POSIX/t/math.t fails on Solaris (OpenIndiana Hipster) with :

    # Failed test 'tanh(-1)'
    # at t/math.t line 55.
    # '0.761594155955765'
    # <=
    # '-0.76'

    # Failed test 'tanh(1) == -tanh(-1)'
    # at t/math.t line 56.
    # got​: 0.761594155955765
    # expected​: -0.761594155955765

    This looks like it's caused by​:

    https://www.illumos.org/issues/11175

    and my illumos-2d6125aab2 system passes these tests when built
    without
    -Duse64bitint.

    Tony

    Will we have to wait for a new release of Illumos in order to close
    this ticket?

    Thank you very much.

    The OP appears to be running a development release of OpenIndiana.

    2019.04 has illumos at git commit a547acf91a[1], Sun Apr 28 18​:59​:18
    2019 +0000.

    The OP's uname string indicates they have a later prerelease
    ffec1fd1b2, Thu May 9 17​:19​:27 2019 +0000.

    The release I downloaded, which includes the fix is dated Sat Jun 22
    10​:26​:20 2019 +0300.

    I expect the OP could already update to fix the issue.

    Tony

    [1] https://wiki.openindiana.org/oi/2019.04+Release+notes

    Since this is fixed upstream, closing.

    Tony

  15. p5pRT commented on Sep 6, 2019

    @p5pRT
    Author

    @tonycoz - Status changed from 'open' to 'resolved'

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions