[gdal-dev] CAD (DWG) Driver

Even Rouault even.rouault at spatialys.com
Sat Nov 19 08:49:25 PST 2016


On samedi 19 novembre 2016 19:34:02 CET Dmitry Baryshnikov wrote:
> Hi Even,
> 
> The big_endian test now is ok. But osx crash at the exiting of python
> after all test finished successfully.
> 
> This is error message:
> 
> libc++abi.dylib: terminating with uncaught exception of type
> std::__1::system_error: mutex lock failed: Invalid argument
> ./gdal/ci/travis/osx/script.sh: line 13: 56363 Abort trap: 6          
> python run_all.py
> 
> I find out that this may be the result of resources free order:
> https://github.com/dmlc/mxnet/issues/309
> https://github.com/google/benchmark/issues/52
> 
> No idea why this occurred then C++11 used. I'll try to use osx CI test
> disabling the CAD driver to exclude this possible issue.
> 

Hum, I think this might be indeed an issue with resource free order between 
the GDALDestroy() destructor function (in gcore/gdaldllmain.cpp) and the 
static C++11 mutex Kurt introduced in
https://github.com/OSGeo/gdal/commit/a9b947d6850d496f09e668f4cd148826d45d9fa9

If this mutex gets destroyed before GDALDestroy() is called, then things might 
indeed crash.

I think we should remove this static C++11 mutex. Kurt ?

(Another option would be to remove the library destructor function. I've the 
feeling they cause more harm than good.)

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


More information about the gdal-dev mailing list