Message394073
This bug is really hard to reproduce on Windows. It depends on flake8 is run. It's a random crash in the last GC collection at Python exit.
Crash related to AST in interpreter_clear() remains me bpo-41796.
Extract of the code:
static void
interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)
{
...
_PyAST_Fini(interp);
...
/* Last garbage collection on this interpreter */
_PyGC_CollectNoFail(tstate);
_PyGC_Fini(interp);
...
}
The crash occurs in _PyGC_CollectNoFail().
_PyAST_Fini() clears references to AST types in the interpreter AST state. AST type instances hold a reference to the their heap type:
static int
ast_traverse(AST_object *self, visitproc visit, void *arg)
{
Py_VISIT(Py_TYPE(self));
Py_VISIT(self->dict);
return 0;
}
But the crash happens when self->dict is deallocated. |
|
Date |
User |
Action |
Args |
2021-05-20 21:51:12 | vstinner | set | recipients:
+ vstinner, paul.moore, christian.heimes, tim.golden, zach.ware, steve.dower, Anthony Sottile, ammar2, pablogsal, erlendaasland, stestagg, shreyanavigyan |
2021-05-20 21:51:12 | vstinner | set | messageid: <1621547472.76.0.142277555175.issue44184@roundup.psfhosted.org> |
2021-05-20 21:51:12 | vstinner | link | issue44184 messages |
2021-05-20 21:51:12 | vstinner | create | |
|