Opened 9 years ago
Closed 9 years ago
#5876 closed defect (invalid)
gdalinfo segfault opening grib file
Reported by: | merbau | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | GDAL_Raster | Version: | 1.11.2 |
Severity: | normal | Keywords: | |
Cc: |
Description
GDAL driver can't read temperature data from grib2 -file. Result is immediate segmentation fault.
[computer]$ gdalinfo --version GDAL 1.11.2, released 2015/02/10 [computer]$ gdalinfo --debug on input/temperature.grb2 Segmentation fault (core dumped)
Another program is able to read the data:
[computer]$ wgrib2 -V input/temperature.grb2 1:0:vt=2015031606:2 m above ground:anl:TMP Temperature [K]: ndata=28985:undef=0:mean=268.638:min=253.026:max=279.905 grid_template=0:winds(N/S): lat-lon grid:(187 x 155) units 1e-06 input WE:SN output WE:SN res 48 lat 59.665061 to 70.142420 by 0.068034 lon 19.080664 to 31.730319 by 0.068008 #points=28985 [... other 24 hour forecasts follow]
Operating system: Fedora 21 x86_64 (up-to-date as in 16.3.2015).
Thank you,
Esa Östring, Data scientist, Infotripla Oy
Attachments (4)
Change History (10)
by , 9 years ago
Attachment: | temperature.grb2 added |
---|
comment:1 by , 9 years ago
Works for me on Windows 7 and GDAL 2.0.0dev from last night:
gdalinfo temperature.grb2 Driver: GRIB/GRIdded Binary (.grb) Files: temperature.grb2 Size is 187, 155 Coordinate System is: GEOGCS["Coordinate System imported from GRIB file",
DATUM["unknown",
SPHEROID["Sphere",6371229,0]],
PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]]
Origin = (19.046659551075269,70.176437399350647) Pixel Size = (0.068008897849462,-0.068034798701299) Corner Coordinates: Upper Left ( 19.0466596, 70.1764374) ( 19d 2'47.97"E, 70d10'35.17"N) Lower Left ( 19.0466596, 59.6310436) ( 19d 2'47.97"E, 59d37'51.76"N) Upper Right ( 31.7643234, 70.1764374) ( 31d45'51.56"E, 70d10'35.17"N) Lower Right ( 31.7643234, 59.6310436) ( 31d45'51.56"E, 59d37'51.76"N) Center ( 25.4054915, 64.9037405) ( 25d24'19.77"E, 64d54'13.47"N) Band 1 Block=187x1 Type=Float64, ColorInterp=Undefined
Description = 2[m] HTGL="Specified height level above ground" NoData Value=9999 Metadata:
GRIB_COMMENT=Temperature [C] GRIB_ELEMENT=TMP GRIB_FORECAST_SECONDS=0 sec GRIB_PDS_PDTN=0 GRIB_PDS_TEMPLATE_NUMBERS=0 0 0 255 128 0 0 0 1 0 0 0 0 103 0 0 0 0 2 255 25
5 255 255 255 255
GRIB_REF_TIME= 1426485600 sec UTC GRIB_SHORT_NAME=2-HTGL GRIB_UNIT=[C] GRIB_VALID_TIME= 1426485600 sec UTC
Band 2 Block=187x1 Type=Float64, ColorInterp=Undefined
Description = 2[m] HTGL="Specified height level above ground" NoData Value=9999 Metadata:
GRIB_COMMENT=Temperature [C] GRIB_ELEMENT=TMP GRIB_FORECAST_SECONDS=3600 sec GRIB_PDS_PDTN=0 GRIB_PDS_TEMPLATE_NUMBERS=0 0 0 255 128 0 0 0 1 0 0 0 1 103 0 0 0 0 2 255 25
5 255 255 255 255
GRIB_REF_TIME= 1426485600 sec UTC GRIB_SHORT_NAME=2-HTGL GRIB_UNIT=[C] GRIB_VALID_TIME= 1426489200 sec UTC
Band 3 Block=187x1 Type=Float64, ColorInterp=Undefined
Description = 2[m] HTGL="Specified height level above ground" NoData Value=9999 Metadata:
GRIB_COMMENT=Temperature [C] GRIB_ELEMENT=TMP GRIB_FORECAST_SECONDS=7200 sec GRIB_PDS_PDTN=0 GRIB_PDS_TEMPLATE_NUMBERS=0 0 0 255 128 0 0 0 1 0 0 0 2 103 0 0 0 0 2 255 25
5 255 255 255 255
GRIB_REF_TIME= 1426485600 sec UTC GRIB_SHORT_NAME=2-HTGL GRIB_UNIT=[C] GRIB_VALID_TIME= 1426492800 sec UTC
comment:2 by , 9 years ago
I cannot reproduce any crash on Linux Ubuntu 14.04 with both GDAL 1.11 branch or trunk
@merbau: Is it a clean build or did you "svn update" from an existing tree (in which case try to make a clean before). You could try running with gdb and/or Valgrind to identify where it crashes.
by , 9 years ago
Attachment: | valgrind_leak_full_out.txt added |
---|
Valgrind run with "--leak-check full"
comment:3 by , 9 years ago
@rouault: gdalinfo and other binaries are completely stock from Fedora repositories, and Fedora 21 installation is up to date. No compilation of binaries or libraries by myself.
I added two valgrind outputs, I hope they are useful. Please suggest other actions, if I can help with this issue.
by , 9 years ago
Attachment: | valgrind_leak_full_dbginfo_out.txt added |
---|
valgrind run with gdal debuginfo installed
comment:4 by , 9 years ago
Hum, I have strong reasons to believe that it is due to Fedora packaging. I've just discovered they don't use the g2clib of GDAL, which has quite a few patches, but the one packaged in Fedora. I've no other explanations why it would happen for the Fedora build and not for a "standard" GDAL build.
History: http://trac.osgeo.org/gdal/log/trunk/gdal/frmts/grib/degrib18/g2clib-1.0.4 http://trac.osgeo.org/gdal/log/spike/grib/degrib18/g2clib-1.0.4?rev=13873 http://trac.osgeo.org/gdal/log/trunk/spike/grib/degrib18/g2clib-1.0.4?rev=10754
That should be reported to the Fedora folks, although I'm not sure if they'll want to switch back to our embedded "copy". A long term solution would be to manage to merge the GDAL changes to upstream g2clib, but that might require quite a lot of work (granted that the g2clib project is responsive to outside contributions, which I have no idea if it is the case)
comment:6 by , 9 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Closing: Fedora specific issue
Temperature forecast for several hours, grib2 format.