[mod_python] on OSX Leopard: "The process has forked..." crash

Graham Dumpleton graham.dumpleton at gmail.com
Mon Oct 6 21:12:06 EDT 2008


Whoops, forgot to reply to list. Can OP please ensure they reply-all
to this email and not first one.

Are you running PHP on the same server? Have you disabled PHP and then
stopped/started Apache to see if problem goes away?

There should be no problem with Python/mod_python itself, but a
problem like this in PHP can be inherited by the Python/mod_python
instance running in the same process.

In other words, not a Python/mod_python problem, instead it is being
affected by PHP hosted by same Apache instance.

Graham

2008/10/7 Lawrence Wang <levity at gmail.com>:
> Hi! I compiled mod_python on OSX Leopard with a simple ./configure && make
> && sudo make install, and it works just fine for almost everything. However,
> certain Python operations cause Apache to crash with many of these errors in
> the log:
>>
>> The process has forked and you cannot use this CoreFoundation
>> functionality safely. You MUST exec().
>>
>> Break on
>> __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__()
>> to debug.
>
> One example of code that causes this:
>>
>> import urllib2
>>
>> data = urllib2.urlopen('http://www.google.com').read()
>
> I'm pretty sure this is caused by mod_python and not, say, python itself,
> because I don't get the same error when I run the same script as a CGI
> handler in apache.
> The hardware is a MacBook with Core 2 Duo (hence 64-bit). Some googling
> revealed that the same error is caused by an old PHP library[1], and that is
> solvable by changing its configuration and recompiling, so I'm hoping the
> same is the case here.
> Any help you can offer is greatly appreciated!
> Lawrence Wang
> [1]: http://iparrizar.mnstate.edu/~juan/urania/2008/09/05/forking-problems-with-freetype-solved/
> _______________________________________________
> 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