[Python-Dev] Possible error in Python 2.4 garbage collector
Kristján Valur Jónsson
kristjan at ccpgames.com
Mon Nov 26 16:16:50 CET 2007
This is almost certainly not a bug in python.
A cursory look indicates that a list being traversed in list_traverse has a NULL member.
I'd suggest examining the other members of the list to figure out what this list is. Use the debugger for this, that is what it is for. It is probably a list you have created in your C code but forgot to check for exceptions when adding members to it, thus leaving one of them with a NULL pointer.
see for example http://wiki.python.org/moin/DebuggingWithGdb for tips on debugging.
K
> -----Original Message-----
> From: python-dev-bounces+kristjan=ccpgames.com at python.org
> [mailto:python-dev-bounces+kristjan=ccpgames.com at python.org] On Behalf
> Of Moritz Mühlenhoff
> Sent: Monday, November 26, 2007 10:58
> To: python-dev at python.org; muehlenhoff at univention.de
> Subject: [Python-Dev] Possible error in Python 2.4 garbage collector
>
> Hi,
> we're running into a problem with the Python interpreter, which we
> suspect
> triggers a bug in the garbage collector or a related part of the memory
> management. We are using Python 2.4.4 in the version from Debian 4.0.
>
> Our C application imports various Python plugins using
> PyNode_Compile().
> This used to work very well (it's a feature we've been using for years
> now),
> but if we import more than 23 modules we're running a segmentation
> fault with
> the backtrace below:
>
> (gdb) bt
> #0 0xb7ee9cad in visit_decref (op=0xb7287ec0, data=0x0)
> at ../Modules/gcmodule.c:269
> #1 0xb7e716d1 in list_traverse (o=0xb724e62c, visit=0xb7ee9ca0
> <visit_decref>, arg=0x0) at ../Objects/listobject.c:2280
> #2 0xb7eea729 in collect (generation=0) at ../Modules/gcmodule.c:294
> #3 0xb7eeb0a3 in _PyObject_GC_Malloc (basicsize=20)
> at ../Modules/gcmodule.c:872
More information about the Python-Dev
mailing list