Bug 676707

Summary: HDF I/O in octave: version mismatch and crash
Product: [Fedora] Fedora Reporter: Przemek Klosowski <przemek>
Component: octaveAssignee: Rakesh Pandit <rpandit>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 14CC: alex, mmahut, rpandit, susi.lehtola
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: octave-3.2.4-4.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-22 18:52:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 677156    
Bug Blocks:    

Description Przemek Klosowski 2011-02-10 21:26:04 UTC
Description of problem:
Octave has a HDF library dependency for HDF5 I/O. The dependency is specified too loosely in packaging, however, allowing a yum update of the HDF library which seems to cause a crash in Octave which was linked with an earlier version. Octave itself detects and warns about this mismatch.

Version-Release number of selected component (if applicable):

Currently Fedora 14 provides:

octave-3.2.4-3.fc14.i686  packaged with HDF5 v. 1.8.4
hdf5-1.8.5.patch1-4.fc14.i686


How reproducible: Very


Steps to Reproduce:
1. run Octave
2. load -hdf5 somefile.hdf
3. crash
  
Actual results:

Octave prints:

Warning! ***HDF5 library version mismatched error***
The HDF5 header files used to compile this application do not match
the version used by the HDF5 library to which this application is linked.
Data corruption or segmentation faults may occur if the application continues.
This can happen when an application was compiled by one version of HDF5 but
linked with a different version of static or shared HDF5 library.
You should recompile the application or check your shared library related
settings such as 'LD_LIBRARY_PATH'.
You can, at your own risk, disable this warning by setting the environment
variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
Setting it to 2 or higher will suppress the warning messages totally.
Headers are 1.8.4, library is 1.8.5
.....
Bye...
panic: Aborted -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete
Aborted (core dumped)


Expected results:

successful file read

Comment 1 Przemek Klosowski 2011-02-10 21:28:34 UTC
I haven't checked yet that recompiling Octave with HDF 1.8.5 fixes this problem but given that Octave itself has code that insists on compile-time and run-time versions of libhdf5 matching, I think the package %spec should specify an equivalent restriction.

Comment 2 Przemek Klosowski 2011-02-10 21:55:15 UTC
OK, I misunderstood the error message. The panic/abort is NOT caused by an actual bug but preventively by the incompatibility detection. When Octave is started as

HDF5_DISABLE_VERSION_CHECK=1 octave

it actually could read my test HDF5 file in spite of the dire warnings.

Comment 3 Susi Lehtola 2011-02-10 22:10:39 UTC
Looks like hdf5 isn't packaged all that well, the soname should be broken every time something like this happens.

We could fix this by adding

%global hdf_version %(grep H5_VERS_INFO /usr/include/H5public.h|awk '{print $6}'|sed 's|"||g;s|-|.|g')

and

Requires: hdf5 = %{hdf_version}

to the spec file, but I think it is hdf5 that should be fixed - other packages might be suffering from the same problem as well.

Comment 4 Fedora Update System 2011-02-13 19:29:24 UTC
octave-3.2.4-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/octave-3.2.4-4.fc14

Comment 5 Fedora Update System 2011-02-14 20:31:07 UTC
octave-3.2.4-4.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update octave'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/octave-3.2.4-4.fc14

Comment 6 Fedora Update System 2011-02-22 18:52:37 UTC
octave-3.2.4-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.