diff options
author | John Mainzer <mainzer@hdfgroup.org> | 2016-03-04 10:09:24 (GMT) |
---|---|---|
committer | John Mainzer <mainzer@hdfgroup.org> | 2016-03-04 10:09:24 (GMT) |
commit | f3763db6b887278b4a193aef325ec017a06d03ec (patch) | |
tree | 07d3247832cd3e26c0d4c92756e0423796a375e7 /src | |
parent | ee3a977d05d113c3c738d05e65d52b6a9ba2eba1 (diff) | |
download | hdf5-f3763db6b887278b4a193aef325ec017a06d03ec.zip hdf5-f3763db6b887278b4a193aef325ec017a06d03ec.tar.gz hdf5-f3763db6b887278b4a193aef325ec017a06d03ec.tar.bz2 |
[svn-r29264] Checkin of fix for assertion failure exposed by Mark Miller's testhdf5
benchmark.
In essence, the problem was failure to set appropriate tags when protecting
entries in the fractal heap sanity check code. This resulted in H5AC protect
failing when H5C_DO_TAGGING_SANITY_CHECKS is set.
This bug was only detected in Mark Miller's bench mark as the existing test
code did not generate the cache contents necessary to execute the pathway in
which the failure occurred.
Cleaned up two other possible occurrences of the tagging issue in passing.
Also cleaned up several over sensitive asserts exposed by the fix.
Note that this checkin does NOT include code to verify the fix.
Verified the fix manually with Mark Miller's benchmark.
Tested: Serial/debug on Jam
Serail/debug and Parallel/debug on Mercury
Diffstat (limited to 'src')
-rw-r--r-- | src/H5HFcache.c | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/src/H5HFcache.c b/src/H5HFcache.c index 840c059..b14b7fc 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -2874,10 +2874,23 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, hid_t dxpl_id, * While the fractal heap makes heavy use of the udata * in this case, since we know that the entry is in cache, * we can pass NULL udata. + * + * Note that we must set the dxpl tag to avoid a failure + * in H5C_protect() if H5C_DO_TAGGING_SANITY_CHECKS is set. + * Do this unconditionally. Can't do this at a higher + * level since this call can be triggered by any protect + * or a flush. + * + * Use the tag assigned to the hdr -- this tag should + * be used all the way down the fractal heap. */ + H5_BEGIN_TAG(dxpl_id, hdr->cache_info.tag, FAIL) + if(NULL == (root_iblock = (H5HF_indirect_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, root_iblock_addr, NULL, H5C__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.") + HGOTO_ERROR_TAG(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.") unprotect_root_iblock = TRUE; + + H5_END_TAG(FAIL) } /* end if */ else { /* the root iblock is protected, and we have no @@ -2935,11 +2948,24 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, hid_t dxpl_id, * While the fractal heap makes heavy use of the udata * in this case, since we know that the entry is in cache, * we can pass NULL udata. + * + * Note that we must set the dxpl tag to avoid a failure + * in H5C_protect() if H5C_DO_TAGGING_SANITY_CHECKS is set. + * Do this unconditionally. Can't do this at a higher + * level since this call can be triggered by any protect + * or a flush. + * + * Use the tag assigned to the hdr -- this tag should + * be used all the way down the fractal heap. */ + H5_BEGIN_TAG(dxpl_id, hdr->cache_info.tag, FAIL) + if(NULL == (iblock = (H5HF_indirect_t *)H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, root_iblock_addr, NULL, H5C__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.") + HGOTO_ERROR_TAG(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.") unprotect_root_iblock = TRUE; HDassert(iblock == root_iblock); + + H5_END_TAG(FAIL) } /* end if */ } /* end else */ @@ -2947,8 +2973,9 @@ H5HF__cache_verify_hdr_descendants_clean(H5F_t *f, hid_t dxpl_id, * in memory for the duration of the call. Do some sanity checks, * and then call H5HF__cache_verify_iblock_descendants_clean(). */ - HDassert(hdr->root_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - HDassert(hdr->root_iblock->cache_info.type == H5AC_FHEAP_IBLOCK); + HDassert(root_iblock); + HDassert(root_iblock->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(root_iblock->cache_info.type == H5AC_FHEAP_IBLOCK); if(H5HF__cache_verify_iblock_descendants_clean(f, dxpl_id, root_iblock, &root_iblock_status, clean) < 0) HGOTO_ERROR(H5E_HEAP, H5E_SYSTEM, FAIL, "can't verify root iblock & descendants clean.") @@ -3325,10 +3352,24 @@ H5HF__cache_verify_descendant_iblocks_clean(H5F_t *f, hid_t dxpl_id, /* fractal heap makes heavy use of the udata */ /* in this case, since we know that the */ /* entry is in cache, we can pass NULL udata */ + /* */ + /* Note that we must set the dxpl tag to */ + /* avoid a failure in H5C_protect() if */ + /* H5C_DO_TAGGING_SANITY_CHECKS is set. */ + /* Do this unconditionally. Can't do this */ + /* at a higher level since this call can be */ + /* triggered by any protect or a flush. */ + /* */ + /* Use the tag assigned to the iblock -- */ + /* this tag should be used all the way down */ + /* the fractal heap. */ + H5_BEGIN_TAG(dxpl_id, iblock->cache_info.tag, FAIL) if(NULL == (child_iblock = (H5HF_indirect_t *) H5AC_protect(f, dxpl_id, H5AC_FHEAP_IBLOCK, child_iblock_addr, NULL, H5C__READ_ONLY_FLAG))) - HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.") + HGOTO_ERROR_TAG(H5E_HEAP, H5E_CANTPROTECT, FAIL, "H5AC_protect() faild.") unprotect_child_iblock = TRUE; + + H5_END_TAG(FAIL) } /* end if */ else { /* child iblock is protected -- use */ |