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

PyObjC_ffi_closure_alloc crash #22

Closed
totaam opened this issue Dec 16, 2021 · 3 comments
Closed

PyObjC_ffi_closure_alloc crash #22

totaam opened this issue Dec 16, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@totaam
Copy link
Collaborator

totaam commented Dec 16, 2021

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [36285]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   _objc.so                      	0x00000001106670eb PyObjC_ffi_closure_alloc + 331
1   _objc.so                      	0x00000001106a2388 PyObjC_RegisterStructType + 1656
2   _objc.so                      	0x0000000110686a76 createStructType + 694
3   libpython3.9.dylib            	0x000000010bab0805 cfunction_call + 69
4   libpython3.9.dylib            	0x000000010ba6c6f7 _PyObject_MakeTpCall + 375 (call.c:191)
5   libpython3.9.dylib            	0x000000010bb5e528 call_function + 776
6   libpython3.9.dylib            	0x000000010bb5ad82 _PyEval_EvalFrameDefault + 26946 (ceval.c:3519)
7   libpython3.9.dylib            	0x000000010bb5f4bd _PyEval_EvalCode + 3245 (pycore_ceval.h:40)
8   libpython3.9.dylib            	0x000000010ba6ce91 _PyFunction_Vectorcall + 257 (call.c:404)
9   libpython3.9.dylib            	0x000000010bb5e3bb call_function + 411
10  libpython3.9.dylib            	0x000000010bb5ace0 _PyEval_EvalFrameDefault + 26784 (ceval.c:3488)
11  libpython3.9.dylib            	0x000000010bb5f4bd _PyEval_EvalCode + 3245 (pycore_ceval.h:40)
12  libpython3.9.dylib            	0x000000010bb54370 PyEval_EvalCode + 64 (ceval.c:4359)
13  libpython3.9.dylib            	0x000000010bb510c5 builtin_exec + 661 (bltinmodule.c:1026)
14  libpython3.9.dylib            	0x000000010baafff7 cfunction_vectorcall_FASTCALL + 215 (methodobject.c:430)

Downgrading pyobjc back to 8.0 does not help: 07d4716
So perhaps the problem comes from the libffi update 3bb55ac?

@totaam totaam added the bug Something isn't working label Dec 16, 2021
totaam added a commit that referenced this issue Dec 16, 2021
totaam added a commit that referenced this issue Dec 16, 2021
@totaam
Copy link
Collaborator Author

totaam commented Dec 16, 2021

Trying to fix this problem got the build VM so messed up that I had to restore it from backups and lost the new certificate from Xpra-org/xpra#3340

For now, downgrading libffi seems to resolve the crash.

@totaam totaam closed this as completed Dec 16, 2021
@totaam
Copy link
Collaborator Author

totaam commented Feb 28, 2023

Looks like libffi really has some issues: Python 3.10.0 crashes on MacOS x86_64 : "This Python bug demonstrates crashes with Python’s test suite on macOS x86_64 using libffi 3.4.2, which don’t occur with libffi 3.3"
this comment: "And when it doesn't have the correct LIBFFI_INCLUDE_DIR then it uses the SDK, we get the version conflict, and buffer overruns galore."
This was meant to be fixed in Python 3.10.1, but perhaps our jhbuild setup still triggers it?

Alternatively, we could try building Python ./configure --with-system-ffi as per https://bugs.python.org/issue44556

@totaam
Copy link
Collaborator Author

totaam commented Jul 24, 2023

Follow up: #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant