[gdal-dev] Segfault in gdalrasterize

Even Rouault even.rouault at spatialys.com
Tue Mar 26 11:39:55 PDT 2019


On mardi 26 mars 2019 17:50:19 CET Ari Jolma wrote:
> We're seeing transient segfaults in gvBurnScanline with a huge in-memory
> raster created by rasterio.
> 
> The raster size is (67264, 51776).
> 
> The segfaults happen in cloud servers, not in laptops or local virtual
> machines.
> 
> Debugging is hard because rasterio installs its own libgdal but with gdb
> I see with bt
> 
> #0  __memset_avx2_unaligned_erms () at
> ../sysdeps/x86_64/multiarch/memset-vec-unaligned-erms.S:245
> #1  0x00007ffff127646f in gvBurnScanline(void*, int, int, int, double) ()
>     from ../rasterio/.libs/libgdal-c9384152.so.20.5.0

First, which GDAL version ?? :-)

> 
> Any ideas?

Yes, GDAL 2.4.1 NEWS contains:

 * rasterize: fix crash when working buffer is larger than 2GB (#1338)

And the stacktrace you show reminds me a lot of the one there was for that 
issue. The working buffer size is GDAL cache max dependent, which is itself 
RAM dependent, hence why the bug happens on some machines and not other ones.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list