RedHat 8.0 Apache + Python CGI segmentation faults

Steve Holden sholden at holdenweb.com
Sun Feb 23 12:11:46 EST 2003


"Bengt Richter" <bokr at oz.net> wrote ...
> On Sat, 22 Feb 2003 19:16:53 GMT, "Steve Holden" <sholden at holdenweb.com>
wrote:
>
> >Couldn't find anything about this in Google. A new machine is running RH
8,
> >and the Apache web server is working. However, attempts to run Python CGI
> >scripts result in segmentation faults, even though the scripts will run
> >quite happily under the user "apache" identity.
> >
> OTTOMH, have you checked the environment that apache is running your CGI
in vs
> user "apache" as a logged-in user? Have you checked the apache httpd.conf
(IIRC)
> parameters for your situation? Virtual hosting? suEXEC'ing you as user
instead
> of apache? User "nobody"? is it finding the right version of python?
> Are you using a C/C++ extension that requires an old C/C++ .so library and
is
> being directed by symlink to an incompatible new version?
>
> >Is this a known phenomenon, or am I going to have to get the dread gdb
out?
> >All the error log records is several segmentation faults for each
attempted
> >CGI access.
>
> Just guessing on a few things to check. I haven't used RH8 (have they
switched
> to proper defaulting of 2.2.2 yet, with internal use of 1.5.2 isolated if
they
> still need that?)
>

It's a great list, but most of it isn't likely to apply - this error even
occurs with the following CGI:

#!/usr/bin/python
print """Content-Type: text/html

<html>
<head><title>Test Page</title></head>
<body>
<h2>Hello!</h2>
</body>
</html>
"""

That being the case, I'm force to conclude it's something in the server -
the httpd.conf file is pretty standard, and I have the code running on other
Apache installations both under Windows and Linux. I did find an Apache bug
report [14692] that looked kind of relevant, so I'm compiling the upgrade as
I write. [aarrgghh! I need an updated mod_auth_mysql, and I can't even find
where it's required!].

Anyway, the main point of this reply is to let you know that RH8.0 doesn't
use Python 1.5.2 any more, as far as I can see from a superficial look. The
/usr/bin/python binary is 2.2.1, which is about as up-to-date as a release
process can be, and shouldn't produce compatibility problems with an upgrade
to 2.2.2.

I recently had email from Todd Warner at Red Hat: apparently developers will
be attending PyCon, and they want to talk about the recent developments in
their use of Python. Although there's nothing formally scheduled, I think
this will be a primary candidate for use of the Open Space that we have left
for at-conference scheduled presentations.

Thanks for your input: it could easily have been one of the possible
problems you mentioned!

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Register for PyCon now!            http://www.python.org/pycon/reg.html







More information about the Python-list mailing list