Opened 8 years ago

Closed 7 years ago

#6369 closed defect (fixed)

misc.py misc_6() heisenbug

Reported by: Kurt Schwehr Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords: segfault
Cc:

Description

Disabling the quiet error handling, I was able to get this before the crash. This bug often seems to go away if I print anything or try to trace it. I'm seeing it at svn head on Ubuntu 14.04. I have no idea what is going on.

ERROR 6: XYZ driver only uses the first band of the dataset.

ERROR 6: HF2 driver only uses the first band of the dataset.

ERROR 6: ZMap driver only uses the first band of the dataset.

ERROR 6: Only 1 (Grey/ColorTable), 2 (Grey+Alpha), 3 (RGB) or 4 (RGBA) band dataset supported
ERROR 4: Attempt to create new tiff file `tmp/tmp/tmp_GTiff_1_UInt16/foo' failed: No such file or directory
ERROR 4: Unable to create file tmp/tmp/tmp_NITF_1_UInt16/foo,
check path and permissions.
ERROR 4: Creation of file tmp/tmp/tmp_HFA_1_UInt16/foo failed.
ERROR 1: Attempt to create an ELAS dataset with an illegal
data type (2).

ERROR 4: Unable to create file tmp/tmp/tmp_AAIGrid_1_UInt16/foo.

Segmentation fault (core dumped)

With some extra printing:

drv num: 1 nBands: 1
ERROR 4: Attempt to create new tiff file `tmp/tmp/tmp_GTiff_1_UInt16/foo' failed: No such file or directory
drv: NITF
drv num: 2 nBands: 1
ERROR 4: Unable to create file tmp/tmp/tmp_NITF_1_UInt16/foo,
check path and permissions.
drv: RPFTOC
drv num: 3 nBands: 1
drv: ECRGTOC
drv num: 4 nBands: 1
drv: HFA
drv num: 5 nBands: 1
ERROR 4: Creation of file tmp/tmp/tmp_HFA_1_UInt16/foo failed.
drv: SAR_CEOS
drv num: 6 nBands: 1
drv: CEOS
drv num: 7 nBands: 1
drv: JAXAPALSAR
drv num: 8 nBands: 1
drv: GFF
drv num: 9 nBands: 1
drv: ELAS
drv num: 10 nBands: 1
ERROR 1: Attempt to create an ELAS dataset with an illegal
data type (2).

drv: AIG
drv num: 11 nBands: 1
drv: AAIGrid
drv num: 12 nBands: 1
ERROR 4: Unable to create file tmp/tmp/tmp_AAIGrid_1_UInt16/foo.

Segmentation fault (core dumped)

If I skip AAIGrid:

rv: XPM
drv num: 25 nBands: 1
ERROR 6: XPM driver doesn't support data type Int32. Only eight bit bands supported.

drv: BMP
drv num: 26 nBands: 1
ERROR 1: Attempt to create BMP dataset with an illegal
data type (Int32), only Byte supported by the format.

drv: DIMAP
drv num: 27 nBands: 1
drv: AirSAR
drv num: 28 nBands: 1
drv: RS2
drv num: 29 nBands: 1
drv: SAFE
drv num: 30 nBands: 1
drv: PCIDSK
drv num: 31 nBands: 1
ERROR 1: Failed to open tmp/tmp/tmp_PCIDSK_1_Int32/foo: No such file or directory
drv: PCRaster
drv num: 32 nBands: 1
ERROR 4: PCRaster driver: Unable to create raster tmp/tmp/tmp_PCRaster_1_Int32/foo
Segmentation fault (core dumped)

Stack trace is not helpful:

ERROR 4: PCRaster driver: Unable to create raster tmp/tmp/tmp_PCRaster_1_Int32/foo

Program received signal SIGSEGV, Segmentation fault.
0x000000000053762b in _PyObject_GC_New ()
(gdb) bt
#0  0x000000000053762b in _PyObject_GC_New ()
#1  0x00000000004b9116 in PyTraceBack_Here ()
#2  0x000000000049b33e in PyEval_EvalFrameEx ()
#3  0x0000000000499ef2 in PyEval_EvalFrameEx ()
#4  0x0000000000499ef2 in PyEval_EvalFrameEx ()
#5  0x0000000000499ef2 in PyEval_EvalFrameEx ()
#6  0x0000000000499ef2 in PyEval_EvalFrameEx ()
#7  0x00000000004a1634 in ?? ()
#8  0x000000000044e4a5 in PyRun_FileExFlags ()
#9  0x000000000044ec9f in PyRun_SimpleFileExFlags ()
#10 0x000000000044f904 in Py_Main ()
#11 0x00007ffff7818ec5 in __libc_start_main (main=0x44f9c2 <main>, argc=2, argv=0x7fffffffe0f8, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffe0e8) at libc-start.c:287
#12 0x0000000000578c4e in _start ()

Change History (2)

comment:1 by Even Rouault, 8 years ago

I cannot reproduce a crash on Ubuntu 14.04. The more worrying thing I've seen with Valgrind is the following, but I cannot reproduce the warning with a self-compilate spatialite 4.1.1 in debug mode (the trace here is with packaged spatialite):

drv = Rasterlite, drv_num=69, nBands = 1, datatype = Byte
==30328== Invalid read of size 4
==30328==    at 0x1053D75B: ??? (in /usr/lib/x86_64-linux-gnu/libspatialite.so.5.1.0)
==30328==    by 0x10B11994: ??? (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==30328==    by 0x10B17F86: sqlite3_step (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==30328==    by 0x7D8743D: OGRSQLiteDataSource::ExecuteSQL(char const*, OGRGeometry*, char const*) (ogrsqlitedatasource.cpp:1830)
==30328==    by 0x7B730B3: OGR_DS_ExecuteSQL (ogrdatasource.cpp:225)
==30328==    by 0x76E2C2D: RasterliteCreateTables(OGRDataSourceHS*, char const*, int, int) (rasterlitecreatecopy.cpp:235)
==30328==    by 0x76E3979: RasterliteCreateCopy(char const*, GDALDataset*, int, char**, int (*)(double, char const*, void*), void*) (rasterlitecreatecopy.cpp:504)
==30328==    by 0x7809B9A: GDALDriver::CreateCopy(char const*, GDALDataset*, int, char**, int (*)(double, char const*, void*), void*) (gdaldriver.cpp:803)
==30328==    by 0x7809D42: GDALCreateCopy (gdaldriver.cpp:850)
==30328==    by 0x68C3C01: GDALDriverShadow_CreateCopy (gdal_wrap.cpp:3854)
==30328==    by 0x68C3C01: _wrap_Driver_CreateCopy (gdal_wrap.cpp:9760)
==30328==    by 0x49C4D8: PyEval_EvalFrameEx (in /usr/bin/python2.7)
==30328==    by 0x4A090B: PyEval_EvalCodeEx (in /usr/bin/python2.7)
==30328==  Address 0x1b08127c is 12 bytes inside a block of size 13 alloc'd
==30328==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30328==    by 0x1053DAB5: ??? (in /usr/lib/x86_64-linux-gnu/libspatialite.so.5.1.0)
==30328==    by 0x10B11994: ??? (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==30328==    by 0x10B17F86: sqlite3_step (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==30328==    by 0x7D8743D: OGRSQLiteDataSource::ExecuteSQL(char const*, OGRGeometry*, char const*) (ogrsqlitedatasource.cpp:1830)
==30328==    by 0x7B730B3: OGR_DS_ExecuteSQL (ogrdatasource.cpp:225)
==30328==    by 0x76E2C2D: RasterliteCreateTables(OGRDataSourceHS*, char const*, int, int) (rasterlitecreatecopy.cpp:235)
==30328==    by 0x76E3979: RasterliteCreateCopy(char const*, GDALDataset*, int, char**, int (*)(double, char const*, void*), void*) (rasterlitecreatecopy.cpp:504)
==30328==    by 0x7809B9A: GDALDriver::CreateCopy(char const*, GDALDataset*, int, char**, int (*)(double, char const*, void*), void*) (gdaldriver.cpp:803)
==30328==    by 0x7809D42: GDALCreateCopy (gdaldriver.cpp:850)
==30328==    by 0x68C3C01: GDALDriverShadow_CreateCopy (gdal_wrap.cpp:3854)
==30328==    by 0x68C3C01: _wrap_Driver_CreateCopy (gdal_wrap.cpp:9760)
==30328==    by 0x49C4D8: PyEval_EvalFrameEx (in /usr/bin/python2.7)
==30328== 

comment:2 by Even Rouault, 7 years ago

Resolution: fixed
Status: newclosed

Seems the issue has gone

Note: See TracTickets for help on using tickets.