summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-06-11 22:34:12 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-06-11 22:37:51 (GMT)
commit8505c1262c5daef43b2c657e68f9a43f32a7c9ee (patch)
tree8966120a40fce5cec25bffd9a959b3f738112a49 /src/H5C.c
parentb5d304acf60c5e650b87c28c0be0dd50245611af (diff)
downloadhdf5-8505c1262c5daef43b2c657e68f9a43f32a7c9ee.zip
hdf5-8505c1262c5daef43b2c657e68f9a43f32a7c9ee.tar.gz
hdf5-8505c1262c5daef43b2c657e68f9a43f32a7c9ee.tar.bz2
Always restart H5C_evict_or_refresh_all_entries_in_page()'s scan of
the entries in a hash bucket after evicting tagged entries. Evicting tagged entries can can affect both entries before and after the current entry in the bucket's linked list, so we cannot be sure that either `entry_ptr` or `follow_ptr` is valid. This stops the assertion (entry_ptr->page != page) || (entry_ptr->refreshed_in_tick == tick) from failing in the test `testvfdswmr.sh many_small`.
Diffstat (limited to 'src/H5C.c')
-rw-r--r--src/H5C.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/H5C.c b/src/H5C.c
index 385610e..948e781 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -1081,9 +1081,10 @@ H5C_evict_or_refresh_all_entries_in_page(H5F_t * f, uint64_t page,
HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, \
"can't evict pinned and tagged entries")
- /* *entry_ptr should be evicted -- set entry_ptr to NULL */
- entry_ptr = NULL;
-
+ /* Both follow_ptr and entry_ptr may have been removed.
+ * Set both to NULL to force the scan to restart.
+ */
+ follow_ptr = entry_ptr = NULL;
} else if ( entry_ptr->type->refresh ) {
#if 0 /* JRM */
HDfprintf(stderr, "refreshing addr/page/tag == %lld/%lld\n",