Strange and hard to reproduce crash

A. M. Archibald peridot.faceted at gmail.com
Mon Oct 30 16:49:38 CST 2006


On 30/10/06, Fernando Perez <fperez.net at gmail.com> wrote:
> On 10/30/06, Charles R Harris <charlesr.harris at gmail.com> wrote:
>
> >  I suspect the real problem is that the refcount keeps going up. Even if it
> > was unsigned it would eventually wrap to zero and with a bit of luck get
> > garbage collected. So probably something isn't decrementing the refcount.
>
> Oops, my bad: I meant *unsigned long long*, so that the refcount is a
> 64-bit object.  By the time it wraps around, you'll have run out of
> memory long ago.  Having 32 bit ref counters can potentially mean you
> run out of the counter before you run out of RAM on a system with
> sufficient memory.

Yes, this is a feature(?) of python as it currently stands (I checked
2.5) - reference counts are 32-bit signed integers, so if you have an
object that has enough references, python will be exceedingly unhappy:
http://mail.python.org/pipermail/python-dev/2002-September/028679.html

It is of course possible that you actually have that many references
to some object, but it seems to me you'd notice twenty-four gigabytes
of pointers floating around...

A. M. Archibald

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Numpy-discussion mailing list