Multithreading segfault
Hi Christophe,
I use the Python API for GMSH and have stumbled upon a segfault issue with multithreaded runs. GMSH is compiled with OpenMP (and OpenCASCADE, if that's relevant). The GMSH from pypi also exhibits the same issue.
The segfault may or may not occur when setting General.NumThreads
> 1. All I can tell is that it happens during the mesh generation, but not when exactly as it sometimes segfaults while generating the 1D mesh, and sometimes 2D or 3D. Sometimes it runs without segfaulting.
I get one of the following different types of error messages on these runs:
double free or corruption (out)
segmentation fault (core dumped)
tcache_thread_shutdown(): unaligned tcache chunk detected double free or corruption (out)
Fatal Python error: Aborted
I haven't provided the script because it's too large, but am happy to provide excerpts when you need it.