HDFGroup / vol-cache

HDF5 Cache VOL connector for caching data on fast storage layers and moving data asynchronously to the parallel file system to hide I/O overhead.
https://vol-cache.readthedocs.io
BSD 3-Clause "New" or "Revised" License
16 stars 8 forks source link

error when closing a netcdf4 file #18

Open wkliao opened 1 year ago

wkliao commented 1 year ago

I encountered a problem with a netcdf4 file. (NetCDF-C 4.9.0 is used.) A short test program "test.c" is given below. It opens and closes a file.

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <netcdf.h>

int main(int argc, char *argv[])
{
   int err, ncid;

   if (argc != 2) {
       printf("Usage: %s filename\n",argv[0]);
       return 1;
   }
   err = nc_open(argv[1], NC_NOWRITE, &ncid);
   assert(err == NC_NOERR);
   err = nc_close(ncid);
   assert(err == NC_NOERR);
   return 0;
}

Run this test program to open file map_g_case_16p.nc4

% gdb test
(gdb) run map_f_case_16p.nc4
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff14626a2 in H5VL_cache_ext_dataset_close (dset=0x6b1a60, dxpl_id=792633534417207304, 
    req=0x0) at /files2/scratch/vol-cache/src/H5VLcache_ext.c:3387
3387      while (p->parent != NULL)
(gdb) print p
$1 = (H5VL_cache_ext_t *) 0xa1
(gdb) print p->parent
Cannot access memory at address 0xf9