Is there any reason you can't use the standard Python 2.5.1 that comes
with Mac OS X 10.5?
> Apache2 (originally compiled as a 64-bit, but downgraded to a 32-
> bit on according to modwsgi guideline). My machine is PPC 64-bit.
Hmmm, I new that the fat binary problem was an issue with Intel,
didn't know it was also an issue with PPC.
> My application is using a python package called soaplib, which depends
> on cElementTree written in C.
> Since a so file for cElementTree wasn't compiled for 4 mac
> architectures, I downgraded apache to 32-bit one. My hello example
> using the soaplib works without any problem, but another application
> using soaplib package runs for the first time but whenever I invoke
> the service from a client apache raises the following error:
> 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.
> [Wed Jan 30 16:58:24 2008] [notice] child pid 98548 exit signal Trace/
> BPT trap (5)
I've seen discussion of this error before, but not with mod_wsgi. Can
you perhaps try the standard OS version of Python while I do some more
research on what the error actually means.
Graham
BTW, it might help if you can get a stack trace for where this is
occurring. Use the procedure for debugging a mod_wsgi daemon process
with gdb described in:
http://code.google.com/p/modwsgi/wiki/DebuggingTechniques
Ie., attach to daemon process and then set a breakpoint of that bug
function name above.
break __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__
Then trigger you request and when gdb drops back to prompt, run:
where
Post the stack trace. This will help to identify which specific code
library and/or module you are using which is causing the problem.
Graham
If you can do that, can see whether 64 bit Intel Leopard shows problem.
BTW, is there any reason why you couldn't recompile cElementTree so it
had all architectures and thus avoid crippling your Apache to run in
32 bit mode?
Graham
For PHP GD, does the very end of the following discussion help:
http://discussions.apple.com/message.jspa?messageID=5705589
In the case of GD, it relates to use of FreeType library, which makes
some Carbon API calls.
I don't understand why OP would have an issue with cElementTree as
wouldn't have expected it to be be making Carbon API calls or even
using a library which would.
Graham
Another comment on this problem, and since prior mail lost context, am
talking about:
__THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__()
with Python, although the Python interpreter is created in Apache
parent process and is passed through a fork, all the Python modules
used by an application are only loaded after the fork. This means that
even if a Python module used Carbon library directly or indirectly,
this problem shouldn't occur as library would only be loaded after
fork and thus would incur the fork.
Thus, the problem can only be because of something loading the Carbon
library in some way when in context of Apache parent process. If PHP
preloads its module in Apache parent process rather than loading them
after fork and Apache child process created, then it would be the
cause, I can't see how it could be Python.
Thus first step would appear to be to disable PHP in Apache and see if
problems in Python go away. If even after doing that and only thing
being loaded is Python and problem still occurs, then would be more
worried.
Graham