-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test group properties aborted with Assertion `mesg->raw_size < 65536' #550
Comments
@emmenlau thank you for the report! I'm having some issues reproducing it. On my Ubuntu 20.04, I installed the latest LLVM 14.0.1 from their website, as well as a CMake buildable HDF5 labelled 1.13.1, yet all my tests pass. Would you be able to elaborate how you install HDF5? |
Thanks @matz-e for the quick response! Hmm, so I could reproduce the problem on Ubuntu 20.04, a recent version of macOS and on Windows 10 Visual Studio 2019 with ClangCl 14.0.0 frontend. All my compilers are clang-based but I do not know if this is relevant. The only other thing that comes to mind is that we use c++20 for all builds (both for hdf5 and HighFive), and we build hdf5 static. Other than that it should be pretty standard... |
OK, I was finally able to reproduce your error, with a release of Clang from their Github release page (14.0.0), as well as my 14.0.1 from the apt repos, as well as HDF5 with automake (I was using their CMake release before). |
Oh my, thanks for this hard work! I am building hdf5 with cmake, but possibly using automake changed some of your build settings that I'm also having... strangely enough. |
I boiled it down a bunch more… also hit this with GCC 11, no extra steps: #include "highfive/H5File.hpp"
using namespace HighFive;
int main() {
const std::string FILE_NAME("h5_group_properties.h5");
FileDriver adam;
adam.add(FileVersionBounds(H5F_LIBVER_LATEST, H5F_LIBVER_LATEST));
File file(FILE_NAME, File::Truncate, adam);
GroupCreateProps props;
props.add(EstimatedLinkInfo(1000, 500));
file.createGroup("g", props, false);
} fails when compiled like:
On the other hand, my "translated" native HDF5: #include <assert.h>
#include "hdf5.h"
int main() {
hid_t file_id, group_id, plist_id, flist_id;
flist_id = H5Pcreate(H5P_FILE_ACCESS);
assert(flist_id != H5I_INVALID_HID);
assert(H5Pset_libver_bounds(list, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) >= 0);
file_id = H5Fcreate("test.h5", H5F_ACC_TRUNC, H5P_DEFAULT, flist_id);
assert(file_id != H5I_INVALID_HID);
plist_id = H5Pcreate(H5P_GROUP_CREATE);
assert(plist_id != H5I_INVALID_HID);
assert(H5Pset_est_link_info(plist_id, 500, 1000) >= 0);
group_id = H5Gcreate(file_id, "g", H5P_DEFAULT, plist_id, H5P_DEFAULT);
assert(group_id != H5I_INVALID_HID);
H5Gclose(group_id);
H5Pclose(plist_id);
H5Fclose(file_id);
H5Pclose(flist_id);
} seems to be fine:
|
So, I had the wrong flags for gcc… #include <assert.h>
#include "hdf5.h"
int main() {
hid_t file_id, group_id, plist_id, flist_id;
flist_id = H5Pcreate(H5P_FILE_ACCESS);
assert(flist_id != H5I_INVALID_HID);
assert(H5Pset_libver_bounds(flist_id, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) >= 0);
file_id = H5Fcreate("test.h5", H5F_ACC_TRUNC, H5P_DEFAULT, flist_id);
assert(file_id != H5I_INVALID_HID);
plist_id = H5Pcreate(H5P_GROUP_CREATE);
assert(plist_id != H5I_INVALID_HID);
assert(H5Pset_est_link_info(plist_id, 64, 1000) >= 0);
group_id = H5Gcreate(file_id, "g", H5P_DEFAULT, plist_id, H5P_DEFAULT);
assert(group_id != H5I_INVALID_HID);
H5Gclose(group_id);
H5Pclose(plist_id);
H5Fclose(file_id);
H5Pclose(flist_id);
} Is a minimal version that works. Changing assert(H5Pset_est_link_info(plist_id, 65, 1000) >= 0); Will spit out exactly the same message. The documentation here states:
So this very much smells like an HDF5 bug to me. I've opened a question in their forum: https://forum.hdfgroup.org/t/h5pset-est-link-info-regression-in-1-13-1/9645 |
Cross link: HDFGroup/hdf5#1632 |
I think the crucial thing to observe is that it's
and from looking at how it's used and how real errors are handled in HDF5, I don't think |
Describe the bug
I've compiled HighFive 2.4.0 against hdf5 1.13.1 on Ubuntu 20.04 x86_64 with Clang 14.0.1. I can run almost all tests successfully except the "Test group properties". It fails with error:
In the corresponding log, I find the output:
The text was updated successfully, but these errors were encountered: