HDF5 I/O broken with integer variables

Bug #1583128 reported by Elvis Stansvik
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
octave (Ubuntu)
Fix Released
Undecided
Unassigned
Wily
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

As described in the upstream report [1], HDF5 I/O using load/save is broken in 4.0.0. This is a regression with the potential for data loss (almost happened to us!).

The bug is fixed upstream with [2], and I plan on asking for an SRU nomination.

[Test Case]

1. Extract the attached .tar.gz, which contains test_hdf5_save.m and test_hdf5_load.m from the upstream report.

2. Run:

2.1. On Octave 3.8:

     octave:1> test_hdf5_save
     x = 123456789

2.2. On Octave 4.0.0:

     octave:1> test_hdf5_load
     x = 255

3. Run (the other way around):

3.1. On Octave 4.0.0:

     octave:2> test_hdf5_save
     x = 123456789

3.2. Octave 3.8:

     octave:1> test_hdf5_load
     x = 21

As you can see, in both cases the result is wrong.

With the updated package installed (see attached debdiff), the result is instead

octave:1> test_hdf5_save
x = 123456789

octave:1> test_hdf5_load
x = 123456789

in both directions (3.8 -> 4.0.0 and 4.0.0 -> 3.8), as expected.

[Regression Potential]

There's really no risk of any regressions. The fix is small and self contained, and the behavior before the fix is completely wrong and could result in data loss.

[1] http://savannah.gnu.org/bugs/?45225
[2] http://hg.savannah.gnu.org/hgweb/octave/rev/d54aa96abadf

description: updated
description: updated
Revision history for this message
Elvis Stansvik (elvstone) wrote :

Add test case

description: updated
Revision history for this message
Elvis Stansvik (elvstone) wrote :

Attaching debdiff for octave_4.0.0-3ubuntu9 which adds the upstream patch, updating the package to octave_4.0.0-3ubuntu10.

description: updated
Revision history for this message
Mike Miller (mtmiller) wrote :

Instead of cherry-picking this one patch, it might be nice to SRU 4.0.2-1ubuntu2 which fixes many important bugs (see list in bug #1563100).

Chris J Arges (arges)
Changed in octave (Ubuntu):
status: New → Fix Released
Revision history for this message
Elvis Stansvik (elvstone) wrote :

Attaching debdiff for the wily package as well, since Chris said on IRC he'd be willing to sponsor an SRU for wily.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

@mtmiller there is a library change in 4.0.2, so no-go for xenial.
(unless you ask for single cherry-picks)

@arges, sorry for stealing this fix, I read on ubuntu-devel somebody asking for the new octave and I did the merge.
Looks like the patch is already applied for yakkety, so you should be able to upload on wily and xenial, right?

Revision history for this message
Amr Ibrahim (amribrahim1987) wrote :

I guess 4.0.1 could be SRUed to Xenial if it has no new dependencies!

Revision history for this message
Elvis Stansvik (elvstone) wrote :

@amribrahim1987, I talked briefly about that with Chris on IRC. The reason I didn't go for 4.0.1 is that it has a boatload of changes, and perhaps not all are SRU-worthy.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Elvis, or anyone else affected,

Accepted octave into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/octave/4.0.0-3ubuntu9.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in octave (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Elvis Stansvik (elvstone) wrote :

@pitti: Thanks! I've tested 4.0.0-3ubuntu9.1 package in xenial-proposed using the test case attached to this report, and the bug is now fixed.

tags: added: verification-done
removed: verification-needed
tags: added: verification-done-xenial verification-needed
removed: verification-done
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Elvis, or anyone else affected,

Accepted octave into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/octave/4.0.0-3ubuntu5.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in octave (Ubuntu Wily):
status: New → Fix Committed
Revision history for this message
Elvis Stansvik (elvstone) wrote :

Thanks! I finally got around to testing the package in wily-proposed as well. All looks good. The behavior with integers in HDF5 is now correct with both load/save.

tags: added: verification-done
removed: verification-done-xenial verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package octave - 4.0.0-3ubuntu5.1

---------------
octave (4.0.0-3ubuntu5.1) wily; urgency=medium

  * debian/patches/hdf5-io-integer.patch: Add upstream patch to fix HDF5
    integer I/O. (LP: #1583128)

 -- Elvis Stansvik <email address hidden> Wed, 18 May 2016 13:11:16 -0500

Changed in octave (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for octave has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package octave - 4.0.0-3ubuntu9.1

---------------
octave (4.0.0-3ubuntu9.1) xenial; urgency=medium

  * debian/patches/hdf5-io-integer.patch: Add upstream patch to fix HDF5
    integer I/O. (LP: #1583128)

 -- Elvis Stansvik <email address hidden> Wed, 18 May 2016 10:03:26 -0500

Changed in octave (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.