This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Jeffrey.Kintscher, jshelly, vstinner
Date 2019-07-15.16:29:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1563208152.01.0.0849926829648.issue37565@roundup.psfhosted.org>
In-reply-to
Content
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:
---
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz
tar -xf Python-3.7.4.tar.xz 
cd Python-3.7.4/
./configure --with-pydebug --prefix /opt/py37
make
./python script.py
# no need to install Python
---

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