Error when Reading from HDF5


When I read from a HDF5 file I get this error:

HDF5-DIAG: Error detected in HDF5 (1.8.16) thread 140055879329600:
#000: …/…/…/src/H5Dio.c line 173 in H5Dread(): can’t read data
major: Dataset
minor: Read failed
#001: …/…/…/src/H5Dio.c line 551 in H5D__read(): can’t read data
major: Dataset
minor: Read failed
#002: …/…/…/src/H5Dchunk.c line 1875 in H5D__chunk_read(): unable to read raw data chunk
major: Low-level I/O
minor: Read failed
#003: …/…/…/src/H5Dchunk.c line 2905 in H5D__chunk_lock(): data pipeline read failed
major: Data filters
minor: Filter operation failed
#004: …/…/…/src/H5Z.c line 1372 in H5Z_pipeline(): filter returned failure during read
major: Data filters
minor: Read failed
#005: …/…/…/src/H5Zdeflate.c line 125 in H5Z_filter_deflate(): inflate() failed
major: Data filters
minor: Unable to initialize object
terminate called after throwing an instance of ‘H5::DataSetIException’
Aborted (core dumped)

Its tough to narrow the code down since this is a large system. There are many other files that are exactly the same as the one causing this error that have no issues so it makes me think its a corruption in this file. What could be causing this and how can I correct it without building a new file? If you need anything to help with the solution let me know, I can share the code but it can be pretty big. Thank you.


Hi Jlahowetz2,
I have a similar/same issue to the one you described (the error message is almost verbatim the same)
Did you find a solution and could you let me know what it is? Thanks!!


What’s the output of

h5dump --enable-error-stack -d [dataset_name] [file_name]

on the dataset/file in question?