[mod_python] invalid pointer, child process dies, broken connections

Richard Lewis richardlewis at fastmail.co.uk
Thu Nov 23 05:44:28 EST 2006


Hi there,

Debian unstable; apache: 2.2.3; modpython: 3.2.10; python: 2.4.4; lxml 1.1.1: 
libxml: 2.6.16; libxslt: 1.1.8.

I posted on 2nd Nov about some invalid pointer errors in my Apache error log. 
At the time I thought they were coming from MySQL and received some 
interesting replies regarding the incompatibility of the mysql client 
libraries compiled into various apache modules.

However, since then I've decided to cut MySQL out of my web application and, 
instead of dynamically converting database records into XML, use 
filesystem-cached XML files which are generated periodically from the 
database by a separate process.

While there are a couple of other advantages to this approach, it hasn't 
solved my initial problem! I still have numerous errors like this in my 
Apache error log:

[Mon Nov 20 10:51:58 2006] [notice] child pid 7087 exit signal Aborted (6)
*** glibc detected *** free(): invalid pointer: 0x0835ab26 ***
*** glibc detected *** free(): invalid pointer: 0x0835ab26 ***
*** glibc detected *** free(): invalid pointer: 0x0835ab26 ***
*** glibc detected *** free(): invalid pointer: 0x0835ab26 ***
[Mon Nov 20 10:54:28 2006] [notice] child pid 7088 exit signal Aborted (6)
[Mon Nov 20 10:54:28 2006] [notice] child pid 7089 exit signal Aborted (6)
[Mon Nov 20 10:54:28 2006] [notice] child pid 7098 exit signal Aborted (6)

It seems to handle several requests and then you get an error message from the 
client (browser) saying that "the connection is broken". You can then retry 
the request and it works after one or two attempts.

I /think/ there is no direct correlation between the invalid pointer errors 
messages and the dropped connections; the times of the messages seem to be 
pretty evenly distributed and don't all result in a broken connection.

Also, the memory addresses of the invalid pointers are often (but not always) 
the same. While the child process ids are always different. What is the child 
process? Is it python?

I've checked to make sure that I'm always returning the content length and 
Apache status code; I'm pretty sure I am! My application is using a frameset 
where the frame document and its four frames are all generated using 
mod_python. Is there anything special I should do to help mod_python with 
this? (Like returning special Apache status codes?)

Apart from getting these errors, my code is pretty much ready to go live. So 
it would be really great if anyone could help me sort out this problem!

Cheers,
Richard
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard Lewis
Sonic Arts Research Archive
http://www.sara.uea.ac.uk/
JID: ironchicken at jabber.earth.li
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


More information about the Mod_python mailing list