glibc invalid pointer error

Travis Oliphant oliphant at
Mon Oct 30 16:13:37 CST 2006

Fernando Perez wrote:

>On 10/30/06, David Huard <david.huard at> wrote:
>>I have a script that crashes, but only if it runs over 9~10 hours, with the
>>following backtrace from gdb. The script uses PyMC, and repeatedly calls (>
>>1000000) likelihood functions written in fortran and wrapped with f2py.
>>Numpy: 1.0.dev3327
>>Python: 2.4.3
>This sounds awfully reminiscent of the bug I recently mentioned:

It actually looks very much like it.  I think the problem may be in f2py 
or in one of the C-API calls where-in there is a reference-count problem 
with the built-in data-type objects.

NumPy won't try to free those anymore which will solve the immediate 
problem, but there is still a reference-count problem somewhere. 

The reference to the data-type objects is consumed by constructors that 
take PyArray_Descr * arguments.  So, you often need to INCREF before 
passing to those constructors.  It looks like this INCREF is forgotten 
in some extension module (perhaps in f2py or PyMC).  It's possible it's 
in NumPy itself, though I've re-checked the code lots of times looking 
for that specific problem.


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

More information about the Numpy-discussion mailing list