Author vstinner
Recipients Jeffrey.Kintscher, jshelly, vstinner
Date 2019-07-15.16:29:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Oh. So Py_FinalizeEx() does get a SIGSEGV when triggering a garbage collection: the test doesn't crash, it's Python which crash at exit.

> Program received signal SIGSEGV, Segmentation fault.
> 0x00002aaaaae88924 in visit_decref (op=0x2aaaaacd3468, data=0x0) at Modules/gcmodule.c:271
> 271	    if (PyObject_IS_GC(op)) {

You can try to dump the content of op? For example:

(gdb) print *op
(gdb) print *op->ob_type

Can you try to rebuild Python from source in debug mode, and then retry the script? Something like:
tar -xf Python-3.7.4.tar.xz 
cd Python-3.7.4/
./configure --with-pydebug --prefix /opt/py37
# no need to install Python

If it works, maybe retry without --with-pydebug.
Date User Action Args
2019-07-15 16:29:12vstinnersetrecipients: + vstinner, Jeffrey.Kintscher, jshelly
2019-07-15 16:29:12vstinnersetmessageid: <>
2019-07-15 16:29:11vstinnerlinkissue37565 messages
2019-07-15 16:29:11vstinnercreate