Ticket #906 (closed defect: worksforme)

Opened 6 years ago

Last modified 19 months ago

NetCDF segmentation fault

Reported by: jdenisgiguere@… Owned by: chaitanya
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.6.2
Severity: normal Keywords: netcdf
Cc: mloskot, dnadeau, warmerdam, kyle

Description (last modified by mloskot) (diff)

Hi,

I get some trouble with NetCDF file avalaible on  http://nomad.geo.usherb.ca/~level2/2002.07.01/.

When I lauch gdalinfo I get a segmentation fault.

I see on old mailing list message that it is not all version of NetCDF file that are readable with gdal. I think that it could be a good idea that in case that the nc file is not supported, there is a nicer message. :-)

Also, there is a open source library (I don't study the license) that allow reading and writing my problematic file. This is the netcdf-bin package of debian. The source seems to come from

 http://my.unidata.ucar.edu/content/software/netcdf/index.html

I test gdalinfo 1.2.6 and today cvs snapshot

Change History

Changed 6 years ago by warmerdam

Jean-Denis, 

Could you indicate what version of GDAL you were using? 

Denis Nadeau is currently working on netcdf support in GDAL, so I will pass
this report on to him.

Changed 6 years ago by jdenisgiguere@…

(In reply to comment #1)
> Jean-Denis, 
> 
> Could you indicate what version of GDAL you were using? 
> 
> Denis Nadeau is currently working on netcdf support in GDAL, so I will pass
> this report on to him.

The bug was reported against version 1.2.6 and cvs snapshot of 2005-08-13.

Changed 6 years ago by denis.nadeau@…

I have done some same for netcdf to support CF conventions.  Could you
provide me with some data where gdal core dumps?


Thanks
Denis

Changed 6 years ago by jdenisgiguere@…

(In reply to comment #3)
> I have done some same for netcdf to support CF conventions.  Could you
> provide me with some data where gdal core dumps?
> 
> 
> Thanks
> Denis

http://nomad.geo.usherb.ca/~level2/2002.07.01/

Changed 6 years ago by denis.nadeau@…

I have solved the problem.  Please update your gdal/frmts/netcdf directory,
recompile and give a try.  I now read latitude and longitude for
geotransformation.  

Changed 4 years ago by mloskot

  • cc mloskot added
  • keywords netcdf added
  • description modified (diff)

Changed 2 years ago by mgrizonnet

  • version changed from unspecified to 1.6.1

Hi,

I have got the same segmentation fault with various netcdf files with the gdalinfo command.

OS: Debian testing gdal: compile from source 1.6.1 (build with the option --with-netcdf=netcdf-install-dir). netcdf : compile from source 4.0.1 netcdf data example :  ftp://ftp.cdc.noaa.gov/Datasets/noaa.oisst.v2/sst.mnmean.nc

I had the same error with netcdf files from the unidata websites.

Regards,

Manuel

Changed 2 years ago by warmerdam

  • cc dnadeau, warmerdam added
  • owner changed from denis.nadeau@… to chaitanya
  • priority changed from high to normal

Chaitanya,

Could you please try to reproduce and resolve this issue with the referenced dataset?

Changed 2 years ago by chaitanya

  • status changed from new to assigned

I have tried this with various versions including 1.6.1, trunk and the 1.6 branch with and without an external netcdf library. I couldn't reproduce the issue with them.

However I did get a problem with an already installed version on my testing machine. It reported 1.6.1, 2009/05/11 but I don't remember how I compiled it. Also, the error always occured, irrespective of the test data at the end of the execution, after all the expected output from the program. If this is how your problem is, it might be fixed by just updating your gdal library.

Could you tell me where the segmentation fault occured? The console output.

Changed 2 years ago by mgrizonnet

Hi

I tried with gdal 1.6.2 compiled from source with the same result today. The segmentation fault occured with the command:

gdalinfo filename.nc

The output of the command is only "segmentation fault" and return immediately after.

To be sure that I don't make a mistake. How I proceed:

compile netcdf from source and install it in $REP/netcdf-install

compile gdal from source with the commands: ./configure --with-netcdf=$REP/netcdf-install make make install

What is the "internal" netCDF that you spoke?

Regards,

Manuel

Changed 2 years ago by dnadeau

This is what I have been using for testing:

hdf5-1.8.3-snap2.tar.gz
netcdf-4-daily.tar.gz

I got a snapshot of GDAL with SVN.

Thinks are working using sst.mnmean.nc

I could not retrieve the files from Sherbrooke University.

http://nomad.geo.usherb.ca/~level2/2002.07.01/

Could you send me a new link? The file might have something different that cause this error.

Changed 2 years ago by mgrizonnet

  • version changed from 1.6.1 to 1.6.2

I made the test on my laptop (ubuntu 9.4 32 bits) and it does not segfault anymore...

This is what I have been using for testing this time: -netcdf-4-1.tar.gz same as my previous test on debian -a snapshot of GDAL with SVN.

I am not a specialist of gdal, netcdf and co but I don't think that the problem comes from the fact that I test now with a snapshot of GDAL on my laptop.

I think more of a problem with version of internal libraries (conflicts..) or perhaps with 64 bits architecture (the PC which segfault got a processor amd64)

I can give you more details on my config if you will.

Regards,

Manuel

Changed 2 years ago by chaitanya

I did all my testing on 64-bit machine. Intel Core 2 Duo T6400. No segfault so far.

Changed 2 years ago by kyle

  • cc kyle added

I am not getting any issues on my build, netcdf 4.0.1 (last stable) Intel(R) Xeon(R) CPU X5472 @ 3.00GHz. Is this still an issue Manuel?

Changed 19 months ago by kyle

Chaitanya, I haven't had any problems on my builds, was this just a build issue? Can we close this ticket?

Changed 19 months ago by chaitanya

  • status changed from assigned to closed
  • resolution set to worksforme

The problem seems to be very isolated. Closing.

Note: See TracTickets for help on using tickets.