Open
Description
The issue
With a multithreaded build of py/pyext, starting pd with an argument causes segfault.
To reproduce
- Build py/pyext with
-DFLEXT_BUILD_TYPE=[MULTI, SHARED]
; - run
pd examplefile.pd
whereexamplefile.pd
is a patch containing py/pyext externals.
Some material
Some patches and their error outputs:
pd attr-1.pd
yields
Fatal Python error: drop_gil: drop_gil: GIL is not locked
Python runtime state: initialized
Current thread 0x00007fced2c38740 (most recent call first):
File "<frozen importlib._bootstrap_external>", line 147 in _path_stat
File "<frozen zipimport>", line 76 in __init__
File "<frozen importlib._bootstrap_external>", line 1350 in _path_hooks
File "<frozen importlib._bootstrap_external>", line 1374 in _path_importer_cache
File "<frozen importlib._bootstrap_external>", line 1408 in _get_spec
File "<frozen importlib._bootstrap_external>", line 1439 in find_spec
File "<frozen importlib._bootstrap>", line 945 in _find_spec
File "<frozen importlib._bootstrap>", line 1002 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1027 in _find_and_load
Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, pyext (total: 14)
Pd: signal 6
pd buffer-1.pd
(this one actually works from time to time)
Segmentation fault (core dumped)
or
Fatal Python error: PyThreadState_Get: the function must be called with the GIL held, but the GIL is released (the current Python thread state is NULL)
Python runtime state: initialized
Thread 0x00007fe0e0a6a640 (most recent call first):
File "<frozen importlib._bootstrap>", line 750 in find_spec
File "<frozen importlib._bootstrap>", line 945 in _find_spec
File "<frozen importlib._bootstrap>", line 1002 in _find_and_load_unlocked
Current thread 0x00007fe0e50ca740 (most recent call first):
File "<frozen importlib._bootstrap>", line 1027 in _find_and_load
Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, pyext (total: 14)
Pd: signal 6
NB: Interestringly enough, when building py/pyext with a monothread build of flext, pd launches but might sometimes states that it was unable to open the patch.
Metadata
Metadata
Assignees
Labels
No labels