STINNER Victor added the comment:

> To debug, since I guess it's due to a memory corruption because
> objects are deallocated while they're still in use, you could try
> to use valgrind.
> Unfortunately, since it's due to a race condition, the overhead
> will probably make it really hard to reproduce :-(

I added assert(_Py_Finalizing == NULL || _Py_Finalizing == PyThreadState_GET()) 
almost everywhere, but the assertion didn't fail. It looks like only the main 
thread is running between the interrupted wait_for_thread_shutdown() and the 
final "python: Modules/gcmodule.c:379: visit_decref: ... failed" assertion in 
PyGC_Collect().

I tried to add directly assert(_PyGCHead_REFS(gc) != 0) in 
_PyGCHead_SET_REFS(), but the assertion didn't fail.

I also ran Python in Valgrind: no error neither.

Ok...

I close this issue as won't fix because it was occur with #19466 applied, but I 
just reverted this patch.

----------
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20526>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to