Bug 1064066 - Test suite failure: test-ldouble
Summary: Test suite failure: test-ldouble
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: glibc
Version: 7.0
Hardware: ppc64
OS: Linux
medium
unspecified
Target Milestone: rc
: ---
Assignee: Martin Sebor
QA Contact: Arjun Shankar
URL:
Whiteboard:
Depends On:
Blocks: 1110700 1276695
TreeView+ depends on / blocked
 
Reported: 2014-02-11 22:37 UTC by Patsy Griffin
Modified: 2016-11-24 12:15 UTC (History)
5 users (show)

Fixed In Version: glibc-2.17-80.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1276695 (view as bug list)
Environment:
Last Closed: 2015-11-19 04:13:59 UTC
Target Upstream Version:


Attachments (Terms of Use)
Output of of glibc 2.17-79 test-ldouble on powerpc64. (4.53 KB, text/plain)
2015-04-01 21:53 UTC, Martin Sebor
msebor: review-
Details
Output of glibc-2.17-79 test-ldouble built with -mtune=power8 on powerpc64. (3.81 KB, text/plain)
2015-04-01 21:56 UTC, Martin Sebor
msebor: review-
Details
Output of glibc 2.17-48 test-ldouble on powerpc64. (4.31 KB, text/plain)
2015-04-02 03:04 UTC, Martin Sebor
no flags Details
Output of of glibc 2.17-79 test-ldouble on powerpc64. (1.25 KB, text/plain)
2015-04-02 19:41 UTC, Martin Sebor
no flags Details
Output of of glibc 2.17-79 test-ldouble built with -mtune=power8. (548 bytes, text/plain)
2015-04-02 19:44 UTC, Martin Sebor
no flags Details
Small test showing the output of clogl and csqrtl for arguments of interest. (1.81 KB, text/plain)
2015-04-03 00:49 UTC, Martin Sebor
no flags Details
Proposed testsuite-only patch to reduce the number of failures to the two mentioned in comment #18. (2.13 KB, patch)
2015-04-07 19:21 UTC, Martin Sebor
no flags Details | Diff
Proposed testsuite-only patch to reduce the number of failures to the two mentioned in comment #18. (2.13 KB, patch)
2015-04-07 19:26 UTC, Martin Sebor
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1186491 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Bugzilla 1209619 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Product Errata RHSA-2015:2199 0 normal SHIPPED_LIVE Moderate: glibc security, bug fix, and enhancement update 2015-11-19 08:04:22 UTC

Internal Links: 1186491 1209619

Description Patsy Griffin 2014-02-11 22:37:48 UTC
Description of problem:
glibc test suite test test-ldouble fails on ppc/ppc64

Version-Release number of selected component (if applicable):
glibc-2.17-48.el7

How reproducible:
Always

Steps to Reproduce:
1. See build log

Comment 9 Martin Sebor 2015-04-01 21:53:53 UTC
Created attachment 1009868 [details]
Output of of glibc 2.17-79 test-ldouble on powerpc64.

Comment 10 Martin Sebor 2015-04-01 21:56:18 UTC
Created attachment 1009869 [details]
Output of glibc-2.17-79 test-ldouble built with -mtune=power8 on powerpc64.

Comment 11 Martin Sebor 2015-04-02 03:04:12 UTC
Created attachment 1009931 [details]
Output of glibc 2.17-48 test-ldouble on powerpc64.

Comment 12 Martin Sebor 2015-04-02 19:35:57 UTC
Comment on attachment 1009868 [details]
Output of of glibc 2.17-79 test-ldouble on powerpc64.

Wrong output.

Comment 13 Martin Sebor 2015-04-02 19:36:21 UTC
Comment on attachment 1009869 [details]
Output of glibc-2.17-79 test-ldouble built with -mtune=power8 on powerpc64.

Wrong output.

Comment 14 Martin Sebor 2015-04-02 19:41:57 UTC
Created attachment 1010310 [details]
Output of of glibc 2.17-79 test-ldouble on powerpc64.

The correct output of glibc 2.17-79 test-ldouble on powerpc64 (not sure why the results in attachment 1009868 [details] were different, perhaps dues to an operator error of some sort).

Comment 15 Martin Sebor 2015-04-02 19:44:09 UTC
Created attachment 1010311 [details]
Output of of glibc 2.17-79 test-ldouble built with -mtune=power8.

Comment 16 Martin Sebor 2015-04-02 22:51:44 UTC
All but three of the failures the original report for glibc-2.17-48 (i.e., those in attachment 1009931 [details]) have since disappeared.  Of the remaining failures those that do persist in the most recent test results of glibc-2.17-79 are the following two:

Failure: Real part of: clog (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -1.110223024625156602053389888482372171810e-16 + 9.332636185032188789900895447238171696171e-302 i: Exception "Underflow" not set
Failure: Real part of: csqrt (0x1p-500 + 0x1p-1074 i) == 5.527147875260444560247265192192255725514e-76 + 4.469444793151709302716387622440056066334e-249 i: Exception "Underflow" set

In addition, the failure below in the glibc-2.17-48 report:

Failure: Test: Imaginary part of: clog (0xe33f66c9542ca25cc43c867p-95 + 0x7f35a68ebd3704a43c465864p-95 i) == 4.1101771307217268747345114262406964584250e-56 + 1.4596065864518742494094402406719567059585 i
Result:
 is:          1.45960658645187424941e+00   0x1.75a8c6f9d64568662d14p+0
 should be:   1.45960658645187423687e+00   0x1.75a8c6f9d645677edb9cp+0
 difference:  2.96337233823640665070e+42   0x1.10248c82100a00000000p+141
 ulp       :  120208663144483600888684377398986721799491796043926053442266675642814693376.0000
 max.ulp   :  0.0000
Maximal error of real part of: clog
 is      : 1 ulp
 accepted: 1 ulp
Maximal error of imaginary part of: clog
 is      : 120208663144483600888684377398986721799491796043926053442266675642814693376 ulp
 accepted: 2 ulp

has been replaced by the following failure:

Failure: Test: Imaginary part of: clog (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 8.3076914081087805757422664530653247447136e-30 + 1.2072712126771536614482822173033535043206 i
Result:
 is:          1.20727121267715366145e+00   0x1.350fb9e7d9c340e6bc99p+0
 should be:   1.20727121267715364894e+00   0x1.350fb9e7d9c340000000p+0
 difference:  1.85210803104869353729e+41   0x1.10248f96102480000000p+137
 ulp       :  7513042743188481597437085793713352561339295191781347309079712734038196224.0000
 max.ulp   :  0.0000
Maximal error of real part of: clog
 is      : 1 ulp
 accepted: 1 ulp
Maximal error of imaginary part of: clog
 is      : 7513042743188481597437085793713352561339295191781347309079712734038196224 ulp
 accepted: 2 ulp

In the current failure there appear to be a couple of issues:

1) the expected result (on the "Failure:" line after the "==" symbol) matches more closely the value printed on the "is:" line than on the "should be:" line, and
2) the difference looks wrong: 1.20727121267715366145 - 1.20727121267715364894 is less than one (1.250826209073797372025617e-17 to be exact, not 1.85e+41).  However, the difference in ULP is 9376476830129752, which is greater than the maximum allowed difference.

The WolframAlpha online calculator computes the same result as glibc when input decimal equivalents of the hex floating arguments (http://www.wolframalpha.com/input/?i=log%283.555711807950272529410540e-01+%2B+I9.346492044548211364229928e-01%29) so it seems that the expected result in this test case is wrong.  In addition, the latest trunk computes the same result and the test doesn't fail (though thousands of others do).

Finally, after removing all the other tests from libm-test.c except the failing clog one, recompiling and re-running the test program the failures disappear.  The relevant portion of the verbose output of the test looks like this:

Test: Imaginary part of: clog (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i) == 8.3076914081087805757422664530653247447136e-30 + 1.2072712126771536614482822173033535043206 i
Result:
 is:          1.20727121267715366145e+00   0x1.350fb9e7d9c340e6bc99p+0
 should be:   1.20727121267715366145e+00   0x1.350fb9e7d9c340e6bc99p+0
 difference:  0.00000000000000000000e+00   0x0.00000000000000000000p+0
 ulp       :  0.0000
 max.ulp   :  0.0000
Maximal error of real part of: clog
 is      : 1 ulp
 accepted: 1 ulp
Maximal error of imaginary part of: clog
 is      : 0 ulp
 accepted: 2 ulp

Clearly, something's not right with the code emitted for the full test.

Comment 17 Martin Sebor 2015-04-03 00:49:15 UTC
Created attachment 1010401 [details]
Small test showing the output of clogl and csqrtl for arguments of interest.

Comment 18 Martin Sebor 2015-04-03 00:50:56 UTC
Decorating the functions declared noinline in the patch for bug 1182355 with attribute noclone reduces the failures in the test to the following two:

testing long double (without inline functions)
Failure: Real part of: clog (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i) == -1.110223024625156602053389888482372171810e-16 + 9.332636185032188789900895447238171696171e-302 i: Exception "Underflow" not set
Failure: Real part of: csqrt (0x1p-500 + 0x1p-1074 i) == 5.527147875260444560247265192192255725514e-76 + 4.469444793151709302716387622440056066334e-249 i: Exception "Underflow" set

Test suite completed:
  6272 test cases plus 5264 tests for exception flags executed.
  2 errors occurred.

Extracting those two test cases into the small test program of their own (in attachment 1010401 [details]) and building and running it against glibc-2.17-79 produces the following output:

clogl (9.999999999999998889776975e-01 + 9.332636185032187753770138e-302 i)
result:    -1.110223024625156602053390e-16 + 9.332636185032188789900895e-302 i
expected:  -1.110223024625156540423632e-16 + 9.332636185032188789900895e-302 i
underflow: 0
csqrtl (3.054936363499604682051979e-151 + 4.940656458412465441765688e-324 i)
result:    5.527147875260444560247265e-76 + 4.469444793151709302716388e-249 i
expected:  5.527147875260444560247265e-76 + 4.469444793151709302716388e-249 i
underflow: 1

The only difference between glibc-2.17-79 and trunk is that clogl call doesn't raise the underflow exception.

Comment 20 Martin Sebor 2015-04-07 19:21:17 UTC
Created attachment 1011902 [details]
Proposed testsuite-only patch to reduce the number of failures to the two mentioned in comment #18.

Comment 21 Martin Sebor 2015-04-07 19:26:12 UTC
Created attachment 1011903 [details]
Proposed testsuite-only patch to reduce the number of failures to the two mentioned in comment #18.

Comment 25 Martin Sebor 2015-04-14 00:29:29 UTC
Patch committed in 75d09cf9849c9251013ca68497ab7c6a1b083aa3

Comment 31 errata-xmlrpc 2015-11-19 04:13:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-2199.html


Note You need to log in before you can comment on or make changes to this bug.