[mod_python] psp.PSP(req, string='hello world') causes segfault

dharana dharana at dharana.net
Tue Apr 26 17:20:27 EDT 2005


I'm using a custom handler which has just this:

-- (webapps/admin/)controller.py ----------
from mod_python import *

def handler(req):
     content_file = psp.PSP(req, string='hello world')
     return
-------------------------------------------


-- relevant part of httpd.conf ---------
<VirtualHost *>
   Servername admin.ozone2.int
   DocumentRoot /home/dharana/websites/ozone2/webapps/admin/

   <Directory /home/dharana/websites/ozone2/webapps/admin/>
       AllowOverride All
       AddHandler mod_python .py
       PythonHandler webapps.admin.controller
       PythonDebug On
       PythonPath "sys.path+['/home/dharana/websites/ozone2/']"
   </Directory>

   DirectoryIndex controller.py
   ErrorLog /var/log/apache/ozone2/admin.log
</VirtualHost>
-----------------------------------------


And when I run it I get a segfault. Relevant part of the log follows:

--- admin.log ------------------------------------------------------
[notice] suEXEC mechanism enabled (wrapper: /usr/local/hosting/bin/suexec)
[notice] Digest: generating secret for digest authentication ...
[notice] Digest: done
[notice] mod_python: Creating 32 session mutexes based on 150 max 
processes and 0 max threads.
[notice] Apache/2.0.52 (Unix) DAV/2 mod_python/3.1.4 Python/2.4 
configured -- resuming normal operations
[notice] mod_python: (Re)importing module 'webapps.admin.controller'
[notice] child pid 23919 exit signal Segmentation fault (11)
[notice] mod_python: (Re)importing module 'webapps.admin.controller'
[notice] child pid 23920 exit signal Segmentation fault (11)
--------------------------------------------------------------------


Writing to a file works ok but is too much overhead. Any ideas?

-
dharana



More information about the Mod_python mailing list