Xpra-org / gtk-osx-build

Build setup to help building the Mac OS X port of GTK+
http://gtk-osx.sourceforge.net/
0 stars 2 forks source link

PyObjC_ffi_closure_alloc crash #22

Closed totaam closed 2 years ago

totaam commented 2 years ago
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: 07d47163e96507153a34cdb35d00b1ee76374fbe So perhaps the problem comes from the libffi update 3bb55acd1030fc6191c7b309616d5a4f88d5acd8?

totaam commented 2 years ago

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 https://github.com/Xpra-org/xpra/issues/3340

For now, downgrading libffi seems to resolve the crash.

totaam commented 1 year ago

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 x8664 using libffi 3.4.2, which don’t occur with libffi 3.3" this comment: _"And when it doesn't have the correct LIBFFI_INCLUDEDIR 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 commented 1 year ago

Follow up: #27