[gdal-dev] Core dump using gdal_translate to create geopackage
Even Rouault
even.rouault at spatialys.com
Mon Feb 15 10:12:57 PST 2016
Le lundi 15 février 2016 17:15:08, Jesse McGraw a écrit :
> Thanks Even.
>
> I've uploaded it to dropbox here:
> https://www.dropbox.com/s/7tcxh9bvk4127c6/Washington_SEC.tif?dl=0
Fixed per https://trac.osgeo.org/gdal/ticket/6365 (the complexity of the own
tile caching mechanisms of the driver, correlated with the GDAL block cache,
has gone a bit out of control...)
A workaround would likely be to increase GDAL_CACHEMAX to a number exceeding
the uncompressed size of the input + output raster.
Even
>
> On 02/15/2016 09:53 AM, Even Rouault wrote:
> > Jesse,
> >
> > The geotiff would be necessary to replicate.
> >
> > Even
> >
> > Le lundi 15 février 2016 15:46:15, Jesse McGraw a écrit :
> >> I was fiddling with Even's geopackage examples
> >> <http://erouault.blogspot.com/2014/12/gdal-geopackage-raster-support.htm
> >> l> when I came across a core dump issue in gdal_translate
> >>
> >> gdal version is compiled from github trunk as of 15 February 2016 under
> >> Ubuntu 15.10 x64
> >>
> >> gdal_translate --version
> >> GDAL 2.1.0dev, released 2015/99/99
> >>
> >> I can share the geotiff in question if need be. Let me know if I can
> >> provide any other helpful information
> >>
> >> Basic command is:
> >> gdal_translate \
> >>
> >> Washington_SEC.tif \
> >> test.gpkg \
> >> -of GPKG \
> >> -co TILE_FORMAT=PNG \
> >> -co TILING_SCHEME=GoogleMapsCompatible
> >>
> >> Out from Valgrind is:
> >> jlmcgraw at UbuntuMate1504:~/Documents/myPrograms/gdal_tests$
> >> CPL_DEBUG=ON \
> >>
> >> > valgrind --tool=memcheck --leak-check=yes --read-var-info=yes \
> >> > gdal_translate \
> >> >
> >> > Washington_SEC.tif \
> >> > test.gpkg \
> >> > -of GPKG \
> >> > -co TILE_FORMAT=PNG \
> >> > -co TILING_SCHEME=GoogleMapsCompatible
> >>
> >> ==30978== Memcheck, a memory error detector
> >> ==30978== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward
> >> et al.
> >> ==30978== Using Valgrind-3.11.0 and LibVEX; rerun with -h for
> >> copyright info
> >> ==30978== Command: gdal_translate Washington_SEC.tif test.gpkg -of
> >> GPKG -co TILE_FORMAT=PNG -co TILING_SCHEME=GoogleMapsCompatible
> >> ==30978==
> >> GDAL: GDALOpen(Washington_SEC.tif, this=0xf7e9d80) succeeds as
> >> GTiff. Input file size is 15538, 11309
> >> GDAL: GDAL_CACHEMAX = 100 MB
> >> GDAL: GDALWarpKernel()::GWKGeneralCase()
> >> Src=0,0,1944x1415 Dst=0,0,2737x1992
> >> 0GDAL: GDALWarpKernel()::GWKGeneralCase()
> >> Src=1941,0,1945x1415 Dst=2737,0,2737x1992
> >> .GDAL: GDALWarpKernel()::GWKGeneralCase()
> >> Src=3883,0,1945x1415 Dst=5474,0,2737x1992
> >> --30978-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0xf2
> >> --30978-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0xf2
> >> --30978-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0xf2
> >> --30978-- warning: evaluate_Dwarf3_Expr: unhandled DW_OP_ 0xf2
> >> ==30978== Invalid write of size 8
> >> ==30978== at 0x4C3259F: memset (in
> >> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> >> ==30978== by 0x5692CD8: memset (string3.h:90)
> >> ==30978== by 0x5692CD8: GDALGeoPackageDataset::ReadTile(int,
> >> int, unsigned char*, bool*) (gdalgeopackagerasterband.cpp:641)
> >> ==30978== by 0x5692FA2: GDALGeoPackageDataset::ReadTile(int,
> >> int) (gdalgeopackagerasterband.cpp:489)
> >> ==30978== by 0x5694B51:
> >> GDALGeoPackageRasterBand::IReadBlock(int, int, void*)
> >> (gdalgeopackagerasterband.cpp:733)
> >> ==30978== by 0x5553B15: GDALRasterBand::GetLockedBlockRef(int,
> >> int, int) (gdalrasterband.cpp:1142)
> >> ==30978== by 0x5572525: GDALRasterBand::IRasterIO(GDALRWFlag,
> >> int, int, int, int, void*, int, int, GDALDataType, long long, long
> >> long, GDALRasterIOExtraArg*) (rasterio.cpp:307)
> >> ==30978== by 0x557312A:
> >> GDALDataset::BlockBasedRasterIO(GDALRWFlag, int, int, int, int,
> >> void*, int, int, GDALDataType, int, int*, long long, long long,
> >> long long, GDALRasterIOExtraArg*) (rasterio.cpp:2938)
> >> ==30978== by 0x551B09C: GDALDataset::RasterIO(GDALRWFlag, int,
> >> int, int, int, void*, int, int, GDALDataType, int, int*, long long,
> >> long long, long long, GDALRasterIOExtraArg*) (gdaldataset.cpp:1991)
> >> ==30978== by 0x551B11D: GDALDatasetRasterIO
> >> (gdaldataset.cpp:2034) ==30978== by 0x56384C4:
> >> GDALWarpOperation::WarpRegion(int, int, int, int, int, int, int,
> >> int, int, int, double, double)
> >> (gdalwarpoperation.cpp:1370)
> >> ==30978== by 0x56387C6:
> >> GDALWarpOperation::ChunkAndWarpImage(int, int, int, int)
> >> (gdalwarpoperation.cpp:720)
> >> ==30978== by 0x57A9F5A: GDALGeoPackageDataset::CreateCopy(char
> >> const*, GDALDataset*, int, char**, int (*)(double, char const*,
> >> void*), void*) (ogrgeopackagedatasource.cpp:3242)
> >> ==30978== Address 0x0 is not stack'd, malloc'd or (recently)
> >> free'd ==30978==
> >> ==30978==
> >> ==30978== Process terminating with default action of signal 11
> >>
> >> (SIGSEGV) ==30978== Access not within mapped region at address 0x0
> >>
> >> ==30978== at 0x4C3259F: memset (in
> >> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> >> ==30978== by 0x5692CD8: memset (string3.h:90)
> >> ==30978== by 0x5692CD8: GDALGeoPackageDataset::ReadTile(int,
> >> int, unsigned char*, bool*) (gdalgeopackagerasterband.cpp:641)
> >> ==30978== by 0x5692FA2: GDALGeoPackageDataset::ReadTile(int,
> >> int) (gdalgeopackagerasterband.cpp:489)
> >> ==30978== by 0x5694B51:
> >> GDALGeoPackageRasterBand::IReadBlock(int, int, void*)
> >> (gdalgeopackagerasterband.cpp:733)
> >> ==30978== by 0x5553B15: GDALRasterBand::GetLockedBlockRef(int,
> >> int, int) (gdalrasterband.cpp:1142)
> >> ==30978== by 0x5572525: GDALRasterBand::IRasterIO(GDALRWFlag,
> >> int, int, int, int, void*, int, int, GDALDataType, long long, long
> >> long, GDALRasterIOExtraArg*) (rasterio.cpp:307)
> >> ==30978== by 0x557312A:
> >> GDALDataset::BlockBasedRasterIO(GDALRWFlag, int, int, int, int,
> >> void*, int, int, GDALDataType, int, int*, long long, long long,
> >> long long, GDALRasterIOExtraArg*) (rasterio.cpp:2938)
> >> ==30978== by 0x551B09C: GDALDataset::RasterIO(GDALRWFlag, int,
> >> int, int, int, void*, int, int, GDALDataType, int, int*, long long,
> >> long long, long long, GDALRasterIOExtraArg*) (gdaldataset.cpp:1991)
> >> ==30978== by 0x551B11D: GDALDatasetRasterIO
> >> (gdaldataset.cpp:2034) ==30978== by 0x56384C4:
> >> GDALWarpOperation::WarpRegion(int, int, int, int, int, int, int,
> >> int, int, int, double, double)
> >> (gdalwarpoperation.cpp:1370)
> >> ==30978== by 0x56387C6:
> >> GDALWarpOperation::ChunkAndWarpImage(int, int, int, int)
> >> (gdalwarpoperation.cpp:720)
> >> ==30978== by 0x57A9F5A: GDALGeoPackageDataset::CreateCopy(char
> >> const*, GDALDataset*, int, char**, int (*)(double, char const*,
> >> void*), void*) (ogrgeopackagedatasource.cpp:3242)
> >> ==30978== If you believe this happened as a result of a stack
> >> ==30978== overflow in your program's main thread (unlikely but
> >> ==30978== possible), you can try to increase the size of the
> >> ==30978== main thread stack using the --main-stacksize= flag.
> >> ==30978== The main thread stack size used in this run was 8388608.
> >> ==30978==
> >> ==30978== HEAP SUMMARY:
> >> ==30978== in use at exit: 138,658,730 bytes in 10,473 blocks
> >> ==30978== total heap usage: 58,500 allocs, 48,027 frees,
> >> 326,332,504 bytes allocated
> >> ==30978==
> >> ==30978== 1,032 bytes in 1 blocks are possibly lost in loss record
> >> 4,171 of 4,283
> >> ==30978== at 0x4C2BBCF: malloc (in
> >> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> >> ==30978== by 0x7CECC56: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CC92F5: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CCC5A6: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CEB222: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D200D7: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D29826: sqlite3_step (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D2A899: sqlite3_exec (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x57B297B: SQLCommand(sqlite3*, char const*)
> >> (ogrgeopackageutility.cpp:41)
> >> ==30978== by 0x57A4D5C:
> >> GDALGeoPackageDataset::FinalizeRasterRegistration()
> >> (ogrgeopackagedatasource.cpp:1383)
> >> ==30978== by 0x57A9CBA: GDALGeoPackageDataset::CreateCopy(char
> >> const*, GDALDataset*, int, char**, int (*)(double, char const*,
> >> void*), void*) (ogrgeopackagedatasource.cpp:3150)
> >> ==30978== by 0x5522F48: GDALDriver::CreateCopy(char const*,
> >> GDALDataset*, int, char**, int (*)(double, char const*, void*),
> >> void*) (gdaldriver.cpp:803)
> >> ==30978==
> >> ==30978== 1,032 bytes in 1 blocks are possibly lost in loss record
> >> 4,172 of 4,283
> >> ==30978== at 0x4C2BBCF: malloc (in
> >> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> >> ==30978== by 0x7CECC56: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CC92F5: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CCC5A6: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CEB222: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D200D7: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D29826: sqlite3_step (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D2A899: sqlite3_exec (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x57B297B: SQLCommand(sqlite3*, char const*)
> >> (ogrgeopackageutility.cpp:41)
> >> ==30978== by 0x5695415:
> >> GDALGeoPackageDataset::WriteShiftedTile(int, int, int, int, int,
> >> int, int) (gdalgeopackagerasterband.cpp:1645)
> >> ==30978== by 0x5695CAC:
> >> GDALGeoPackageRasterBand::IWriteBlock(int, int, void*)
> >> (gdalgeopackagerasterband.cpp:2121)
> >> ==30978== by 0x555805F: GDALRasterBlock::Write()
> >> (gdalrasterblock.cpp:743)
> >> ==30978==
> >> ==30978== 1,304 bytes in 1 blocks are possibly lost in loss record
> >> 4,186 of 4,283
> >> ==30978== at 0x4C2BBCF: malloc (in
> >> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> >> ==30978== by 0x7CECC56: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CC92F5: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CCC5A6: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CCD0FF: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D003AE: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D007FA: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D012E8: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D0374F: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D06D63: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D09554: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D2346A: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978==
> >> ==30978== 3,912 bytes in 3 blocks are possibly lost in loss record
> >> 4,228 of 4,283
> >> ==30978== at 0x4C2BBCF: malloc (in
> >> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> >> ==30978== by 0x7CECC56: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CC92F5: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CCC5A6: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CCD0FF: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D003AE: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D007FA: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D012E8: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D0374F: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D06EB7: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D09554: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D2346A: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978==
> >> ==30978== 710,680 bytes in 545 blocks are possibly lost in loss
> >> record 4,275 of 4,283
> >> ==30978== at 0x4C2BBCF: malloc (in
> >> /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> >> ==30978== by 0x7CECC56: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CC92F5: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CCC5A6: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7CCD0FF: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D003AE: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D007FA: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D012E8: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D0374F: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D09228: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D2346A: ??? (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978== by 0x7D29826: sqlite3_step (in
> >> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
> >> ==30978==
> >> ==30978== LEAK SUMMARY:
> >> ==30978== definitely lost: 0 bytes in 0 blocks
> >> ==30978== indirectly lost: 0 bytes in 0 blocks
> >> ==30978== possibly lost: 717,960 bytes in 551 blocks
> >> ==30978== still reachable: 137,940,770 bytes in 9,922 blocks
> >> ==30978== of which reachable via heuristic:
> >> ==30978== length64 : 483,616
> >> bytes in 2,334 blocks
> >> ==30978== suppressed: 0 bytes in 0 blocks
> >> ==30978== Reachable blocks (those to which a pointer was found) are
> >> not shown.
> >> ==30978== To see them, rerun with: --leak-check=full
> >> --show-leak-kinds=all
> >> ==30978==
> >> ==30978== For counts of detected and suppressed errors, rerun with:
> >> -v ==30978== ERROR SUMMARY: 6 errors from 6 contexts (suppressed:
> >> 0 from
> >>
> >> 0) Segmentation fault (core dumped)
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list