[geos-devel] Segmentation fault when using intersect with multithreading

Sandro Santilli strk at kbt.io
Thu Nov 23 23:46:14 PST 2017

On Thu, Nov 23, 2017 at 06:05:56PM +0100, Tanguy Fardet wrote:
> Hi again,
> just to let you know that the segfault dissapears if I store
> oneGEOSPreparedGeometry copy of the global GEOSGeom evironment per OpenMP
> thread and use the thread-specific copy in GEOSPreparedIntersects_r.
> Thus, it seems that, at least in my code and GEOS 3.6.2, the API is not
> providing thread safe access to shared data using OpenMP.

There's currently no use of locks in base classes to protect
mutable resources, while there are some of them lazy cache
creators. Improving that situation is welcome, if you are up
to send patches.


More information about the geos-devel mailing list