I added the following debug printout to the code that flushes the metadata 
cache:

```diff
diff --git a/src/H5C.c b/src/H5C.c
index 288f3db7a1..71ec201d73 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -5841,6 +5841,7 @@ H5C__flush_ring(H5F_t *f, H5C_ring_t ring, unsigned flags)
                     protected_entries++;
                 } /* end if */
                 else {
+                    printf("flushing %s to addr %ld size %ld\n", 
entry_ptr->type->name, entry_ptr->addr, entry_ptr->size);
                     if(H5C__flush_single_entry(f, entry_ptr, (flags | 
H5C__DURING_FLUSH_FLAG)) < 0)
                         HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "Can't 
flush entry")
 ```

The result when running my test program:

```
[estan@newton hdf5bug]$ ./add_dataset sizeoptimized.h5 
flushing Superblock to addr 0 size 96
flushing v1 B-tree to addr 136 size 544
flushing local heap prefix to addr 184 size 120
flushing Symbol table node to addr 304 size 328
flushing object header to addr 1280 size 272
flushing v1 B-tree to addr 1552 size 2096
flushing Superblock to addr 0 size 96
[estan@newton hdf5bug]$
```

As you can see, the writeout of the v1 B-tree of size 544 to address 136 will 
overwrite the (pre-existing) local heap prefix of size 120 at address 184. I've 
verified that the flush actually results in a write (`H5FD_sec2_write` gets 
called).

As to why that B-tree cache entry has gotten an `addr` / `size` which overlaps 
a preexisting piece of data, I haven't figured out yet. Perhaps someone 
familiar with the code can have a look?





---
[Visit 
Topic](https://forum.hdfgroup.org/t/requesting-update-on-blocker-bug-hdffv-10300/5869/2)
 or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://forum.hdfgroup.org/email/unsubscribe/15886b366e39ea8129c81026ec5a4eb233bf03a21e27ada25dfaadd2dbf44bb7).

Reply via email to