Closed schwehr closed 1 day ago
gfs_193.20230720.i0000.f168_nodata.grb2
@schwehr can you attach / link to that dataset?
How exactly are you reading ? Trying gdalinfo -mm -stats
, gdalinfo -checksum
, gdal_translate ... out.tif
, gdal_translate ... out.tif -co INTERLEAVE=BAND
, or Python ReadRaster() on this dataset shows that the code path of https://github.com/OSGeo/gdal/blob/566204a0969479efccbe7671ba7a40e0375a5ead/gcore/rasterio.cpp#L3326-L3332 is not taken
I didn't write this code and I haven't been able to follow it all the way through. The data is being fed through a VSI wrapper for the sandbox boundary. The only trace I can get so far is without line numbers:
GDALCopyWords64+0x124(0x5611918b6054)
GDALRasterBand::IRasterIO(GDALRWFlag, int, int, int, int, void*, int, int, GDALDataType, long long, long long, GDALRasterIOExtraArg*)+0x507(0x5611918b1227)
GDALRasterBand::RasterIO(GDALRWFlag, int, int, int, int, void*, int, int, GDALDataType, long long, long long, GDALRasterIOExtraArg*)+0x305(0x561191878e45)
I think this was because the sandbox code didn't check the data type correctly and the as a result was working with a pixel size of 0 bytes as the test injects a data type of 0 - Unknown.
I think this was because the sandbox code didn't check the data type correctly and the as a result was working with a pixel size of 0 bytes as the test injects a data type of
0 - Unknown.
ah indeed, a lot / most GDAL methods aren't ready to deal with GDT_Unknown!
ah indeed, a lot / most GDAL methods aren't ready to deal with GDT_Unknown!
ticketed as https://github.com/OSGeo/gdal/issues/11257
What is the bug?
I hit trouble going to 8f2f8efd89db360811f4aab8c7e6a67b307cc12c, so I'm backing up and setting CPL_CPU_REQUIRES_ALIGNED_ACCESS. I think the crash happens in here: https://github.com/OSGeo/gdal/blob/566204a0969479efccbe7671ba7a40e0375a5ead/gcore/rasterio.cpp#L3326-L3332
I get a sandbox crash in GDALCopyWords64 when I enable CPL_CPU_REQUIRES_ALIGNED_ACCESS in a test that tries to read this grib. And it works fine from gdalinfo (with both asan and msan builds).
Steps to reproduce the issue
This is in a non-standard build Linux environment with a bazel based build inside sandbox2 so I'm hoping my description will trigger someone to who hit something similar.
Versions and provenance
yes, I'm back at 566204a09694 from 2023-09-15, right before CPL_CPU_REQUIRES_ALIGNED_ACCESS goes away in https://github.com/OSGeo/gdal/commit/8f2f8efd89db360811f4aab8c7e6a67b307cc12c. And this is in sandbox2 where I can't pull off debugging or logging easily.
Additional context
Chances are slim, but just maybe someone will have an idea. I'll likely disable the aligned path in
GDALCopyWords64
and move on.