Skip to content

error when closing a netcdf4 file #18

Description

@wkliao

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions