Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on M1 #113

Open
ducha-aiki opened this issue Jul 10, 2023 · 1 comment
Open

Crash on M1 #113

ducha-aiki opened this issue Jul 10, 2023 · 1 comment

Comments

@ducha-aiki
Copy link

Hi,

I have remembered why I needed all that "FindPythonPyEnv" business. Without it, after successful compilation, I got the import crash:

(pytorch) dmytromishkin@Z000845-845 ~/dev python
Python 3.9.16 (main, Mar  8 2023, 04:29:24) 
[Clang 14.0.6 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pixsfm
Fatal Python error: take_gil: PyMUTEX_LOCK(gil->mutex) failed
Python runtime state: unknown

zsh: abort      python

And the solution I was using is actually described in the still open PyBind11 issues:
pybind/pybind11#3081 (comment)

@ducha-aiki
Copy link
Author

ducha-aiki commented Jul 10, 2023

@skydes @Tobias-Fischer

The explanation in that thread is that

Using the classic find_package(pybind11 REQUIRED) & then pybind11_add_module(XX MODULE $SRCS)
lead to python being hardlinked causing the PyMutex_Lock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant