Bug 642693

Summary: Rebase libdfp to pick up bug fixes and move out of tech preview
Product: Red Hat Enterprise Linux 6 Reporter: John Jarvis <jjarvis>
Component: libdfpAssignee: Andreas Schwab <schwab>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: borgan, brueckner, cward, ddumas, ebachalo, mfranc, plyons, pm-rhel, schwab, sglass, tao
Target Milestone: rcKeywords: OtherQA, Rebase, ZStream
Target Release: 6.1   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libdfp-1.0.6-1.el6 Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 09:53:19 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 673222    
Bug Blocks: 580566, 621987, 625033, 657321    
Attachments:
Description Flags
Updated LIBDFP 1.0.3 rebase package
none
strace test_ln_v1
none
first core file of the segmentation fault
none
second core file of the segmentation fault
none
libdfp 1.0.4
none
libdfp 1.0.5 archive
none
Libdfp 1.0.6 archive
none
Fix for the latest S/390 testsuite failures
none
Libdfp 1.0.7 archive none

Description John Jarvis 2010-10-13 11:12:35 EDT
Description:

libdfp was first included in the RHEL 6.0 Supplemental ISO but due to bugs found late in the dev cycle, had to be declared as tech preview for RHEL 6.0.  This BZ will pick up a rebase for 6.1 and 6.0.z which includes the bug fixes and will move libdfp out of tech preview.
Comment 2 John Jarvis 2010-10-13 11:14:24 EDT
IBM is signed up to test on both the s390x and Power platforms and provide feedback.
Comment 4 John Jarvis 2010-10-13 14:59:52 EDT
IBM, please post the rebased libdfp package in this BZ.
Comment 5 John Jarvis 2010-10-14 14:54:52 EDT
*** Bug 625033 has been marked as a duplicate of this bug. ***
Comment 7 RHEL Product and Program Management 2010-10-19 06:12:47 EDT
All rebased packages need to be documented in the Release Notes.
Please add draft content to the "Technical Notes" field.

If the rebase changes documented procedures, then please create
a bugzilla clone in the affected book component or use component
"Documentation" if you are unsure which book component to select.
Comment 8 John Jarvis 2010-11-22 10:19:02 EST
IBM is signed up to test and provide feedback, setting OtherQA.
Comment 9 IBM Bug Proxy 2010-11-24 08:21:28 EST
Created attachment 462616 [details]
Updated LIBDFP 1.0.3 rebase package


------- Comment on attachment From luisgpm@linux.vnet.ibm.com 2010-11-24 08:16 EDT-------


Hi Red Hat,

Attached is the rebase archive for LibDFP. This package contains all the fixes up until now.

Regards,
Luis
Comment 11 John Jarvis 2010-11-24 10:34:06 EST
*** Bug 625033 has been marked as a duplicate of this bug. ***
Comment 12 John Jarvis 2010-11-24 10:36:21 EST
*** Bug 621987 has been marked as a duplicate of this bug. ***
Comment 14 IBM Bug Proxy 2010-11-30 03:31:44 EST
Created attachment 463660 [details]
strace test_ln_v1
Comment 15 IBM Bug Proxy 2010-11-30 03:31:52 EST
Created attachment 463661 [details]
first core file of the segmentation fault
Comment 16 IBM Bug Proxy 2010-11-30 03:32:00 EST
Created attachment 463662 [details]
second core file of the segmentation fault
Comment 17 IBM Bug Proxy 2010-12-01 04:44:11 EST
------- Comment From mgrf@de.ibm.com 2010-12-01 04:31 EDT-------
Hello Red Hat,
tests on the rebase libdfp are still ongoing -> will post when complete

Luis:
the updated libdfp still has version 1.0.3, the same as the incomplete libdfp.
I see a huge risk without version change to loose control and get the wrong one included finally after all the work

Please change the version of the upstream libdfp -> and when tests are complete attach that final rebase version to this bugzilla.

Also the libdfp is requested for z.stream update
-> if the corrected libdfp has the same version as the incomplete there will be confusion with all installations in the field
Comment 18 John Jarvis 2010-12-07 13:09:51 EST
So there is an updated patch coming for this request?  This BZ is already in MODIFIED state, do we need to pull out the patch that went in on November 24 and wait for a new one?
Comment 19 IBM Bug Proxy 2010-12-07 19:22:01 EST
------- Comment From luisgpm@linux.vnet.ibm.com 2010-12-07 19:17 EDT-------
John,

There is an upcoming patch to bump the version up to avoid confusion, and also a patch to address another issue that was caught during testing. they should be provided until the end of this week.

Luis
Comment 20 IBM Bug Proxy 2010-12-08 11:34:10 EST
------- Comment From mgrf@de.ibm.com 2010-12-08 11:26 EDT-------
(In reply to comment #24)
> So there is an updated patch coming for this request?  This BZ is already in
> MODIFIED state, do we need to pull out the patch that went in on November 24
> and wait for a new one?

John,
YES  pull out that  version from November 24 th from testing and wait for the new one until posted
Comment 21 IBM Bug Proxy 2010-12-10 14:33:47 EST
------- Comment From luisgpm@linux.vnet.ibm.com 2010-12-10 14:20 EDT-------
John,

The version of libdfp, upstream, has been bumped up to 1.0.4 to avoid confusion and an additional fix was checked in that will solve one more conversion issue for strtod...

The following is fixed.

Unpatched:

strtod32("0.9999999", NULL) -> 1.000000

Patched:

strtod32("0.9999999", NULL) -> 0.9999999

I'm attaching a new rebase archive.

Regards,
Luis
Comment 22 IBM Bug Proxy 2010-12-10 14:34:00 EST
Created attachment 468043 [details]
libdfp 1.0.4


------- Comment on attachment From luisgpm@linux.vnet.ibm.com 2010-12-10 14:27 EDT-------


The new rebase archive to be used by RedHat.
Comment 26 IBM Bug Proxy 2011-01-18 00:23:43 EST
Created attachment 473972 [details]
libdfp 1.0.5 archive


------- Comment on attachment From rsa@us.ibm.com 2011-01-18 00:17 EDT-------


Attached is an archive of Libdfp 1.0.5 which fixes all outstanding issues in Libdfp.

This has been tested on Power5 & Power6.  I'd appreciate a test on System Z.

Included since 1.0.4 are the following fixes:
------------------------------------------------------------------------
r12584 | ryanarn | 2011-01-17 22:55:36 -0600 (Mon, 17 Jan 2011) | 9 lines

Increment Libdfp to version 1.0.5.

2011-1-17  Ryan S. Arnold  <rsa@us.ibm.com>

	* configure: Regenerated.
	* tests/test-strtod.c: Removed unnecessary test cases.
	* configure.ac: Incremented the version number to 1.0.5.
	* Versions.def: Incremented the version number to 1.0.5.

------------------------------------------------------------------------
r12583 | ryanarn | 2011-01-17 20:36:22 -0600 (Mon, 17 Jan 2011) | 20 lines

Checked in the following patch which fixed a bug in
sysdeps/dpd/dpd-private.c's dpd_to_char[0x3f4] element where what should be
"774" was actually "974".  This caused some values that fell on a particular
boundary to be displayed with ....974.... instead of ....774....  Added a new
testcase to verify correct behavior.

2011-01-17  Ryan S. Arnold  <rsa@us.ibm.com>

	* Makefile.in (libdfp_tests): Added test-log10d.
	* tests/test-decode.c: Added decode of log10d128(0.0000000011DL) to
	verify that it prints correctly in declets.
	* tests/test-logd.c (main): Added pbuf[CHAR_MAX] so that tests work
	properly.
	* tests/test-log10d.c: New test-case which verifies that printf now
	works properly for the result of log10d128(0.0000000011DL).
	* sysdeps/dpd/dpd-private.c: Fixed dpd_to_char[0x3f4] from "974" to
	"774" since the previous was a typo which was making values print
	incorrectly.


------------------------------------------------------------------------
r12582 | ryanarn | 2011-01-17 12:42:34 -0600 (Mon, 17 Jan 2011) | 19 lines

An earlier change which removed the passing of the environment flags to the
libdecnumber submake invocation caused a regression where -f[pic|PIC] and
-mcpu="foo" aren't being passed to the libdecnumber 'make' stage, which caused
a segv on system Z, but was ultimately a regression on all platforms.  The
following checkin corrects this problem.

2011-01-17  Ryan S. Arnold  <rsa@us.ibm.com>

	* configure: Regenerated.
	* configure.ac: Removed addition of -fPIC to CFLAGS and instead export
	it to Makefile.in who is now responsible for adding it to CFLAGS.  Set
	(picflags): Default to -fpic since the GOT for libdfp should be small
	enough that -fPIC isn't needed.
	* Makefile.in: (BACKEND_CFLAGS): New variable which passes -mcpu=foo
	and -fpic to the backend sub make invocation in -DEFS to get around
	the fact that libdecnumber/Makefile.in won't allow overridden CFLAGS.
	* sysdeps/dpd/dpd-private.c: Fixed 'used when uninitialized' warning
	by switching "else if" case to "else" for Decimal128.

------------------------------------------------------------------------
r12265 | luis | 2010-12-10 04:56:24 -0600 (Fri, 10 Dec 2010) | 6 lines

2010-12-10  Luis Machado  <luisgpm@br.ibm.com>

	* strtod32.c: Fix precedence of arithmetic operation.
	* tests/test-strtod.c: Add new testcase and fix wrong tests.
Comment 27 IBM Bug Proxy 2011-01-18 17:33:54 EST
Created attachment 474164 [details]
Libdfp 1.0.6 archive


------- Comment on attachment From rsa@us.ibm.com 2011-01-18 17:25 EDT-------


Attached is an archive of Libdfp 1.0.6 which includes the following fixes since libdfp 1.0.4.

This fixes all known bugs in Libdfp that we know about.

------------------------------------------------------------------------
r12594 | ryanarn | 2011-01-18 16:16:57 -0600 (Tue, 18 Jan 2011) | 33 lines

The following fixes correct a bug in __printf_dfp where values with a
sufficiently negative exponent would cause a segv on s390 (we got lucky on
PowerPC) when the 'index' (position of the digit to use for rounding) became
negative.  Also cleaned up test cases.

Bumped version to 1.0.6.

2011-1-18  Ryan S. Arnold  <rsa@us.ibm.com>

	* configure: Regenerated.
	* tests/test-isfinite.c: Changed expectation on isfinite() for
	negative numbers on Power5 to '1'.  Power6 (hardware isfinite) returns
	'-1' on isfinite.  The spec simply says that non-zero means finite.
	* tests/test-logd.c: Removed half completed 'quantize compare'
	functionality which was throwing a false error.
	* tests/test-decode.c: Removed dangling printf that wasn't useful.
	* tests/test-printf.c: Added a _Decimal128 test for printing (1.0DL /
	1.000000e-123DL) which has a sufficiently negative exponent that it
	forced the 'index' (rounding digit) position to be negative and caused
	a segv when __printf_dfp() tried to erroneously round the result on
	s390.  We got lucky up until now on PowerPC due to the kernel
	reserving space on the top of the stack.
	* configure.ac: Incremented the version number to 1.0.6.
	* Versions.def: Incremented the version number to 1.0.6.

2011-1-18  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* printf_dfp.c (__printf_dfp): Fixed segv where, if the exponent is
	sufficiently negative it pushes 'index' (the digit used to round
	values to the left) into a negative number.  In that case we simply
	don't need to round at all.


------------------------------------------------------------------------
r12593 | ryanarn | 2011-01-18 12:19:38 -0600 (Tue, 18 Jan 2011) | 17 lines

Fixed an issue where _Decimal32 foo = strtod("0.99999999"); [notice the 8
digits whereas _Decimal32 can only handle a 7 digit mantissa] was converted to
0.9999999DF, which implies truncation of the extra digit rather than rounding
as expected.  The expected result is 1.0DF.

2011-1-18  Ryan S. Arnold  <rsa@us.ibm.com>

	* tests/test-strtod.c: Adjusted assumptions of tests from truncation
	on too long of an input to rounding to nearest.

2011-1-18  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* strtod32.c (FUNCTION_L_INTERNAL): Check an extra digit on the input
	to see if we need to round rather than truncate.

------------------------------------------------------------------------
r12584 | ryanarn | 2011-01-17 22:55:36 -0600 (Mon, 17 Jan 2011) | 9 lines

Increment Libdfp to version 1.0.5.

2011-1-17  Ryan S. Arnold  <rsa@us.ibm.com>

	* configure: Regenerated.
	* tests/test-strtod.c: Removed unnecessary test cases.
	* configure.ac: Incremented the version number to 1.0.5.
	* Versions.def: Incremented the version number to 1.0.5.

------------------------------------------------------------------------
r12583 | ryanarn | 2011-01-17 20:36:22 -0600 (Mon, 17 Jan 2011) | 20 lines

Checked in the following patch which fixed a bug in
sysdeps/dpd/dpd-private.c's dpd_to_char[0x3f4] element where what should be
"774" was actually "974".  This caused some values that fell on a particular
boundary to be displayed with ....974.... instead of ....774....  Added a new
testcase to verify correct behavior.

2011-01-17  Ryan S. Arnold  <rsa@us.ibm.com>

	* Makefile.in (libdfp_tests): Added test-log10d.
	* tests/test-decode.c: Added decode of log10d128(0.0000000011DL) to
	verify that it prints correctly in declets.
	* tests/test-logd.c (main): Added pbuf[CHAR_MAX] so that tests work
	properly.
	* tests/test-log10d.c: New test-case which verifies that printf now
	works properly for the result of log10d128(0.0000000011DL).
	* sysdeps/dpd/dpd-private.c: Fixed dpd_to_char[0x3f4] from "974" to
	"774" since the previous was a typo which was making values print
	incorrectly.


------------------------------------------------------------------------
r12582 | ryanarn | 2011-01-17 12:42:34 -0600 (Mon, 17 Jan 2011) | 19 lines

An earlier change which removed the passing of the environment flags to the
libdecnumber submake invocation caused a regression where -f[pic|PIC] and
-mcpu="foo" aren't being passed to the libdecnumber 'make' stage, which caused
a segv on system Z, but was ultimately a regression on all platforms.  The
following checkin corrects this problem.

2011-01-17  Ryan S. Arnold  <rsa@us.ibm.com>

	* configure: Regenerated.
	* configure.ac: Removed addition of -fPIC to CFLAGS and instead export
	it to Makefile.in who is now responsible for adding it to CFLAGS.  Set
	(picflags): Default to -fpic since the GOT for libdfp should be small
	enough that -fPIC isn't needed.
	* Makefile.in: (BACKEND_CFLAGS): New variable which passes -mcpu=foo
	and -fpic to the backend sub make invocation in -DEFS to get around
	the fact that libdecnumber/Makefile.in won't allow overridden CFLAGS.
	* sysdeps/dpd/dpd-private.c: Fixed 'used when uninitialized' warning
	by switching "else if" case to "else" for Decimal128.

------------------------------------------------------------------------
r12265 | luis | 2010-12-10 04:56:24 -0600 (Fri, 10 Dec 2010) | 6 lines

2010-12-10  Luis Machado  <luisgpm@br.ibm.com>

	* strtod32.c: Fix precedence of arithmetic operation.
	* tests/test-strtod.c: Add new testcase and fix wrong tests.
Comment 28 IBM Bug Proxy 2011-01-20 04:04:16 EST
Created attachment 474408 [details]
Fix for the latest S/390 testsuite failures
Comment 29 John Jarvis 2011-01-20 10:06:09 EST
When exactly is this library going to complete testing?  It seems like a new rebase or bugfix is trickling in almost on a daily basis.  If the testing isn't complete let's just move this to 6.2 and leave it in tech preview.
Comment 30 IBM Bug Proxy 2011-01-20 15:54:58 EST
------- Comment From sameske@de.ibm.com 2011-01-20 15:41 EDT-------
My DFP tests on System z are complete now and all issues seem to be resolved.
I'll do some final verifications once it has been included into RHEL6.
Comment 31 IBM Bug Proxy 2011-01-21 11:34:54 EST
------- Comment From krebbel@linux.vnet.ibm.com 2011-01-21 11:21 EDT-------
(In reply to comment #59)
> When exactly is this library going to complete testing?  It seems like a new
> rebase or bugfix is trickling in almost on a daily basis.  If the testing isn't
> complete let's just move this to 6.2 and leave it in tech preview.

As Volker said we just finished testing libdfp. I've fixed the last 2 bugs we found with hardware support on S/390. The testsuite is now clean on S/390 with and without hardware support on s390 and s390x.

Ryan will apply the last patch soon. So we will need another version bump. Please consider a rebase to libdfp version 1.0.7.
Comment 32 John Jarvis 2011-01-21 12:03:28 EST
As discussed in this morning's weekly IBM call, we will no longer do rebases of the libdfp library for RHEL 6.1 so it will stay at the current level, libdfp-1.0.6-1.el6.  For any remaining issues found, please open separate bug reports and prepare fixes as patches on top of libdfp-1.0.6-1.el6 and set the bugs as blockers on this BZ.  

We will plan to respin the package one last time at the end of February so have all fixes in by the end of February.
Comment 33 IBM Bug Proxy 2011-01-21 12:15:24 EST
Created attachment 474645 [details]
Libdfp 1.0.7 archive


------- Comment on attachment From rsa@us.ibm.com 2011-01-21 12:09 EDT-------


The attached archive is the 1.0.7 archive.

At this point hardware and software DFP have been tested and cleared in all combinations on both S390 and PowerPC[32|64].

The rebase includes the following fix:

------------------------------------------------------------------------
r12619 | ryanarn | 2011-01-21 10:43:23 -0600 (Fri, 21 Jan 2011) | 21 lines

Fixed s390 hw support for numdigits to bias the exponent and return '1' for a
zero mantissa which is congruent to what is done for soft-dfp.  Also enabled
extended rounding modes for s390.

Incremented version to 1.0.7.

2011-1-21  Ryan S. Arnold  <rsa@us.ibm.com>

	* configure: Regenerated.
	* configure.ac: Incremented the version umber to 1.0.7.
	* Versions.def: Incremented the version umber to 1.0.7.

2011-1-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* sysdeps/s390/dfpu/numdigits.h (setexp): Bias the exponent and return
	'1' for z zero mantissa, which is what is done for soft-dfp.
	* sysdeps/s390/dfpu/fe_decround.c (__fe_dec_setround): Enable extended
	rounding modes (5,6 and 7) which are not covered by the standard.
Comment 34 Suzanne Yeghiayan 2011-01-24 13:19:09 EST
*** Bug 657321 has been marked as a duplicate of this bug. ***
Comment 35 IBM Bug Proxy 2011-02-18 16:04:30 EST
------- Comment From mgrf@de.ibm.com 2011-02-18 15:58 EDT-------
(In reply to comment #63)
> As discussed in this morning's weekly IBM call, we will no longer do
> rebases of the libdfp library for RHEL 6.1 so it will stay at the current
> level, libdfp-1.0.6-1.el6.
> For any remaining issues found, please open separate bug reports
> and prepare fixes as patches on top of libdfp-1.0.6-1.el6 and set the
> bugs as blockers on this BZ.
> We will plan to respin the package one last time at the end of February
> so have all fixes in by the end of February.

The related BZ containing the fixes on top of libdfp 1.0.6 is:

LTC 69283 - RCP411894 - Fix libdfp 1.0.6 testsuite failures on s390
when using hardware support

The summary is misleading - the fixes are required on top of libdfp.

The fixes are tested and accepted upstream with libdfp 1.0.7
Comment 36 IBM Bug Proxy 2011-03-31 16:33:29 EDT
------- Comment From mgrf@de.ibm.com 2011-03-31 16:26 EDT-------
Hello John, Joe,
The fixes from the related BZ seem not included in R 6.1 yet,
please see
69283  -  RCP411894- Fix libdfp 1.0.6 testsuite failures on s390 when
using hardware support

So instead of opening a new BZ as per your advice I would continue to use RCP411894.
Comment 37 Chris Ward 2011-04-06 07:03:05 EDT
~~ Partners and Customers ~~

This bug was included in RHEL 6.1 Beta. Please confirm the status of this request as soon as possible.

If you're having problems accessing 6.1 bits, are delayed in your test execution or find in testing that the request was not addressed adequately, please let us know.

Thanks!
Comment 38 IBM Bug Proxy 2011-04-11 12:03:41 EDT
------- Comment From sameske@de.ibm.com 2011-04-11 11:52 EDT-------
All open issues reported on RHEL6.0 have been verified successfully on snap2 and all tests have been finished successfully now.
Comment 39 IBM Bug Proxy 2011-04-12 11:53:40 EDT
------- Comment From mgrf@de.ibm.com 2011-04-12 11:45 EDT-------
This is verified on R 6.1 on System z - set to verified   Thx
Comment 40 errata-xmlrpc 2011-05-19 09:53:19 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0659.html