[mod_python] Segfaults with modpython 2.7.6

Chaitan Rogers crogers at waplications.com.au
Mon Oct 15 15:53:25 EST 2001

Hello All,
	I am using Apache 1.13.20, Python 2.1.1 and modpython 2.7.6 on Debian GNU/Linux 2.2.
	I am also using the publisher handler to publish my pages.
	This all work very well and is nice and speedy.
	However, when I try and add a CleanupHandler I get the following in my logs:
	[notice] child pid 1787 exit signal Segmentation fault (11)
	Apache does not crash. Only the child thread does.
	Without the CleanupHandler everything is fine.
	The relevant apache conf:
	# httpd.conf
	<Directory /var/www/site-foobar/wwwroot/mod-python>
		SetHandler python-program
		PythonHandler mod_python.publisher
		PythonCleanupHandler cleanup
		PythonDebug On

	My cleanup handler looks like this (for debugging I've taken everything out.) :
	# cleanup.py
	def cleanuphandler(req):
		return apache.OK
	Has anybody else had this problem or can anybody suggest a fix?

	PS. The following may also be relevant.
	1) Python is compiled without threads.
	2) I have tried sticking -DEAPI in the Makefile.
	3) I have also not stuck -DEAPI in the modpython Makefile. 
	I don't know which is correct but the former stopped apache from complaining on startup.

More information about the Mod_python mailing list