summaryrefslogtreecommitdiffstats
path: root/test/testvfdswmr.sh.in
diff options
context:
space:
mode:
authorvchoi <vchoi@jelly.ad.hdfgroup.org>2021-08-05 22:34:11 (GMT)
committervchoi <vchoi@jelly.ad.hdfgroup.org>2021-08-05 22:34:11 (GMT)
commit94ca861b4ee46ef81edbd31df325a33d5681b7dd (patch)
tree79838058dd7c065fd6f8f28d01ad36509338dcb3 /test/testvfdswmr.sh.in
parent14cbceaa96dfef990e34179de4a49ff226c71ae7 (diff)
downloadhdf5-94ca861b4ee46ef81edbd31df325a33d5681b7dd.zip
hdf5-94ca861b4ee46ef81edbd31df325a33d5681b7dd.tar.gz
hdf5-94ca861b4ee46ef81edbd31df325a33d5681b7dd.tar.bz2
Fix the segmentation fault that occurs when running test/vfd_swmr_group_writer with one million old style groups.
(A) src/vfd_swmr_enlarge_shadow_index(): --When enlarging the metadata file index entries, HDmalloc() is used to allocate space for the index entries, but they are later freed at file close via H5MM_xfree() in H5F__dest(). This is corrected to use H5MM_calloc() instead to be consistent. Note that entries are initially allocated also via H5MM_calloc() in H5F__vfd_swmr_create_index(). --If the pointer to the old metadata file index entries exists (shared->old_mdf_idx), need to free the old entries via H5MM_xfree(). (B) test/testvfdswmr.sh.in: --The test is added to verify that the bug is resolved.
Diffstat (limited to 'test/testvfdswmr.sh.in')
-rw-r--r--test/testvfdswmr.sh.in34
1 files changed, 32 insertions, 2 deletions
diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in
index b0ab785..7ef14be 100644
--- a/test/testvfdswmr.sh.in
+++ b/test/testvfdswmr.sh.in
@@ -145,9 +145,9 @@ all_tests="generator expand shrink expand_shrink sparse vlstr_null vlstr_oob zoo
all_tests="${all_tests} groups groups_attrs groups_ops few_big many_small attrdset"
tests=${all_tests}
-# For exhaustive run, add: os_groups_attrs, os_groups_ops, dsetops, dsetchks
+# For exhaustive run, add: os_groups_attrs, os_groups_ops, os_groups_seg, dsetops, dsetchks
if [[ "$HDF5TestExpress" -eq 0 ]] ; then # exhaustive run
- all_tests="${all_tests} os_groups_attrs os_groups_ops dsetops dsetchks"
+ all_tests="${all_tests} os_groups_attrs os_groups_ops os_groups_seg dsetops dsetchks"
fi
if [ $# -gt 0 ]; then
@@ -1009,6 +1009,36 @@ done
###############################################################################
#
+# Setting for "os_groups_seg" test
+#
+# Only for exhaustive run
+#
+# Verify the segmentation fault is fixed when running with:
+# --1,000,000 groups
+# --as writer only
+#
+###############################################################################
+#
+#
+GROUP_seg_n=1000000 # Number of groups when segmentation fault occurs
+if [ ${do_os_groups_seg:-no} = no ]; then
+ continue
+fi
+echo launch vfd_swmr_group operations with old-style group: $GROUP_seg_n groups ......may take some time......
+catch_out_err_and_rc vfd_swmr_group_writer \
+ ../vfd_swmr_group_writer -q -N -G -n $GROUP_seg_n -a $GROUP_seg_n
+
+# Collect exit code of the writer
+if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+fi
+
+# Clean up output files
+rm -f vfd_swmr_group_writer.{out,rc}
+
+###############################################################################
+#
# Setting for bigset (few_big and many_small) tests
#
###############################################################################