Open abhibaruah opened 3 weeks ago
I've been able to recreate this, and am taking a look at it now; the issue may indeed be the size of the variable; I'm playing around with using nc_get_vara_short()
and trying to establish consistent behavior. I will follow up.
Update: I'm seeing inconsistent behavior. sometimes the file works, using nc_get_vara_short()
, and sometimes I see the issue you have reported, in that the assertion is tripped and it fails. The interesting thing seems to be that it will either fail immediately, or it will work but take nearly 40 minutes to complete (due to the size of the file). I wonder if there needs to be some failover error handling here, but I'll need to dig into the API to see what's actually happening here before I know for sure what, if anything, we can do about this. @DennisHeimbigner any insight into this?
NetCDF version: v4.9.2 OS: Debian 12
I have a netCDF program which tries to read the variable 'water_temp' from the netcdf file located here using byte range reading.
While executing the program, I see a process abortion (segmentation violation) during the call to 'nc_get_var_short' with the following message:
"a.out: /tmp/batserve/B3p1/glnxa64/netcdf/libsrc/httpio.c:261: httpio_get: Assertion `ncbyteslength(http->region) == extent' failed. Abort"
I do not see any errors and the variable is read correctly if I download the file to my local drive.
P.S: The file is ~2 GB in size, and the variable is a 40 x 3251 x 4500 int16 variable. So I am guessing that the large size of the file and the variable creates some issues with byte-range reading.