-
-
Notifications
You must be signed in to change notification settings - Fork 409
Closed
Labels
Description
Problem description
The gtest "general" test suite segfaults when compiling with older versions of HighFive. Specifically, this includes 2.3.1 (the version available in Fedora 37), as well as version 2.4.0 and 2.4.1. Versions 2.5.0 and newer seem to work fine.
It doesn't look like Cantera is doing anything obviously wrong here, so we may just need to require HighFive >= 2.5.0.
Steps to reproduce
- Compile Cantera using a system install of HighFive version 2.3.1, or check out the
v2.3.1tag of the submodule - Run
scons test-general - See the error below
Behavior
Test segfaults, with the following output:
[----------] 7 tests from Storage
[ RUN ] Storage.groups
[ OK ] Storage.groups (1 ms)
[ RUN ] Storage.writeAttributes
[ OK ] Storage.writeAttributes (0 ms)
[ RUN ] Storage.readAttributes
[ OK ] Storage.readAttributes (0 ms)
[ RUN ] Storage.writeData
Segmentation fault. Stack trace:
0# 0x00007FF98CCE8BC9 in /root/cantera/build/lib/libcantera_shared.so.3
1# 0x00007FF98C559B20 in /lib64/libc.so.6
2# 0x00007FF98C67303D in /lib64/libc.so.6
3# 0x00007FF98C335638 in /lib64/libhdf5.so.200
4# H5T__conv_vlen in /lib64/libhdf5.so.200
5# H5T_convert in /lib64/libhdf5.so.200
6# H5D__scatgath_write in /lib64/libhdf5.so.200
7# H5D__contig_write in /lib64/libhdf5.so.200
8# H5D__write in /lib64/libhdf5.so.200
9# H5VL__native_dataset_write in /lib64/libhdf5.so.200
10# 0x00007FF98C336236 in /lib64/libhdf5.so.200
11# H5VL_dataset_write in /lib64/libhdf5.so.200
12# H5Dwrite in /lib64/libhdf5.so.200
13# void HighFive::SliceTraits<HighFive::DataSet>::write<std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > >(std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > const&) in /root/cantera/build/lib/libcantera_shared.so.3
14# Cantera::Storage::writeData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Cantera::AnyValue const&) in /root/cantera/build/lib/libcantera_shared.so.3
15# 0x00000000004C2B05 in /root/cantera/build/test/general/general
16# 0x000000000052307D in /root/cantera/build/test/general/general
17# 0x0000000000514A54 in /root/cantera/build/test/general/general
18# 0x0000000000514FB2 in /root/cantera/build/test/general/general
19# 0x0000000000515340 in /root/cantera/build/test/general/general
20# 0x0000000000518451 in /root/cantera/build/test/general/general
21# 0x000000000051368F in /root/cantera/build/test/general/general
22# 0x000000000041DC34 in /root/cantera/build/test/general/general
23# 0x000000000041C501 in /root/cantera/build/test/general/general
24# 0x00007FF98C544510 in /lib64/libc.so.6
25# __libc_start_main in /lib64/libc.so.6
26# 0x0000000000417945 in /root/cantera/build/test/general/general
FAILED: Test 'general' exited with code -11
scons: done building targets.
Running in gdb points to this case in test_serialization.cpp (lines 580-581):
any = vector<vector<string>>({{"foo", "bar"}, {"spam", "eggs"}});
file->writeData("test", "string-matrix", any);and these lines of Storage.cpp (lines 562--564):
} else if (data.isVector<vector<string>>()) {
h5::DataSet dataset = sub.createDataSet<string>(name, space);
dataset.write(data.asVector<vector<string>>());System information
- Cantera version: 3.0.0b1
- OS: Ubuntu 20.04 or Fedora 37
- software versions:
- HighFive 2.3.1
- libhdf5 1.12.1
Reactions are currently unavailable