[issue13616] Never ending loop in in update_refs Modules/gcmodule.c

Jesús Cea Avión report at bugs.python.org
Sat Dec 17 19:38:21 CET 2011


Jesús Cea Avión <jcea at jcea.es> added the comment:

The only way of this thing actually happening is if the GC link list has actually a cycle.

Without a testcase to try to reproduce, it can't be debugged.

David, can you reproduce this consistently, even if it takes a few hours?.

As Amaury pointed out, if you have tons of objects, GC can take a while. And if your memory is paged out to swap, this can actually be VERY slow.

To know if this is actually a infinite loop, when you think it is stuck in the loop, just check current value of "gc" and set a breakpoint for that value in the loop. So GDB will stop again if "gc" gets the same value again and so we are actually in a loop.

In the meantime, check your page-in rate. If you are paging-in furiously, you are not in a loop, you are (mechanically slow) bringing objects back to memory.

Can you tell us how big your python process is (in memory), how much physical RAM you have, and if some other processes are competing for memory?.

If you can confirm that we are actually in an infinite loop... there is little that we can do without some testcase we can reproduce. The key here is that if you can reproduce, we can slowly move forward.

----------
nosy: +jcea

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13616>
_______________________________________


More information about the Python-bugs-list mailing list