[mod_python] Segfault with Vampire

Ian Stokes-Rees i.stokes-rees1 at physics.ox.ac.uk
Sat Oct 22 19:09:21 EDT 2005


OK, That looks like it is probably it (changing to just mod_python and 
then importing pyexpat does cause the seg fault).

The problem is that after upgrading the installed library to expat 
1.95.8 (same as Python -- see below), and restarting Apache, I still get 
seg faults.

Do I need to rebuild Apache, mod_python, or vampire?  I wouldn't have 
thought so if they are dynamically linked...

Cheers,

Ian

Python 2.4.1 (#1, Aug 31 2005, 15:59:42)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import pyexpat
 >>> pyexpat.version_info
(1, 95, 8)

[stokes at grid stokes]$ strings /usr/lib/libexpat* | grep expat_
expat_external.h
expat_1.95.8
expat_1.95.8
expat_1.95.8
expat_1.95.5
expat_1.95.8

Graham Dumpleton wrote:
> Vampire imports xmlrpclib, so you may be affected by the expat library
> version mismatch problem. See:
> 
>   http://www.modpython.org/pipermail/mod_python/2005-October/019348.html
> 
> for some details. Use the prev/next links for that mailing list thread to
> go back through the discussion to get the context.
> 
> Simplest way to check is to put PythonHandler back to "boo" and in
> "boo.py" add:
> 
>   import xmlrpclib
> 
> If it crashes when access, it is the expat problem and nothing to do with
> Vampire itself.
> 
> In short, upgrade expat to a newer version, or at least the same version
> as embedded in Python. See mailing list discussion for how to find out.
> 
> Graham
> 
> On 22/10/2005, at 5:46 AM, Ian Stokes-Rees wrote:
> 
>> Hi,
>>
>> I have Apache, Python, and mod_python setup as follows:
>>
>>  Apache/2.0.53 (Unix) mod_python/3.1.4 Python/2.4.1
>>
>> mod_python works fine, however when I try to use Vampire I get a seg 
>> fault:
>>
>> [Fri Oct 21 20:31:38 2005] [notice] mod_python: (Re)importing module 
>> 'vampire'
>> [Fri Oct 21 20:31:39 2005] [notice] child pid 23753 exit signal 
>> Segmentation fault (11)
>>
>> I can't figure out what the source of the seg fault is.  Vampire is in 
>> the sys.path.  The only thing I change in the .htaccess is "myprob" to 
>> "vampire" for the PythonHandler, and I don't touch the actual file 
>> (resource).  Any thoughts on the source of this would be greatly 
>> appreciated.  Below are my .htaccess file and myprob.py.
>>
>> Ian.
>>
>> .htaccess:
>> SetHandler mod_python
>> PythonHandler vampire
>> PythonDebug On
>>
>> myprob.py:
>> from mod_python import apache
>>
>> def handler(req):
>>     req.content_type = "text/plain"
>>     req.write("boo")
>>     return apache.OK
>>
>> _______________________________________________
>> Mod_python mailing list
>> Mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>
> 


More information about the Mod_python mailing list