mod_python’s Fault
mod_python 3.3 causes a segmentation fault in Apache when evaluating type(req.finfo) where req is the request object passed to a mod_python handler.
In case you wondered who on earth would try to evaluate that expression, Winpdb does, if you try to expand the req object in the namespace viewer.
But don’t you worry, there is a work around available. The latest Winpdb version in the SVN repository tiptoes around that nasty request member. You can get it from: winpdb.svn.sourceforge.net/viewvc/winpdb/trunk/winpdb/ or with the following command:
svn co https://winpdb.svn.sourceforge.net/svnroot/winpdb/trunk/winpdb winpdb
Thanks to Greg for reporting this problem in the forum.
A tip of the day for conclusion: When debugging a mod_python script on a forking Apache server, each request may be handled by a different processes. To be able to debug such a script you may need to re-attach Winpdb to the new process with each request or configure your Apache server to use a single process for the purpose of debugging.
Winpdb - A Platform Independent Python Debugger
I saw a comment about type(req.finfo) failing in one of the forums I monitor (don’t remember which exactly). I asked for the poster to try some things to help debug the extent of the problem but they never replied. It makes it hard to fix these things properly when people don’t want to help, or even bring it to the attention of the correct forum, such as the mod_python list. Anyway, end of rant.
From all the people in this world you chose to rant at the blog of that nasty poster. It is me Graham
I tried to subscribe to the mod_python dev list but the email bounced and the dog ate what was left of it. It was the busiest week I had in a while so unfortunately that was the end of it.
btw: type(req.notes) does not fail. My system is Ubuntu 7.10, Python 2.5.1, Apache 2.2.4 and mod_python 3.3.1