Is this a bug? Python intermittently stops dead for seconds

Tim Peters tim.peters at gmail.com
Sun Oct 1 16:16:04 EDT 2006


[charlie strauss]
>>> Below is a simple program that will cause python to intermittently
>>> stop executing for a few seconds.  it's 100% reproducible on my
>>> machine.

[Giovanni Bajo]
>> Confirmed with Python 2.4.2 on Windows.

[Jorgen Grahn]
> And Python 2.3.5 on Linux, amd64.  In fact, it causes heavy swapping so it
> will disrupt other processes, too.
>
> I didn't read the code, stupid as I am, but I trust that the behavior
> doesn't match what the code actually tries to do.

No, that's what it does:  as it goes on, it creates an ever-increasing
and unbounded number of immortal objects and lists.  The "time burps"
merely reflect that the more live containers and objects you have, the
longer it takes for cyclic gc to determine that they're not trash.



More information about the Python-list mailing list