soarpenguin / python-multiprocessing

Automatically exported from code.google.com/p/python-multiprocessing
Other
0 stars 0 forks source link

Mac OS X 10.5 CoreFoundation issue #22

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using Python 2.5.4 with Leopard (10.5).  I checked out multiprocessing
from the SVN repository (Rev 73).

I'd like to know if there is a chance that the following issue gets fixed
in the backport.  I'm having a similar issue (except of course that my
target function does different things, imported modules are different,
etc.) as the post below describes:

http://developer.berlios.de/bugs/?func=detailbug&bug_id=15295&group_id=9001

Since the above report doesn't appear to get noticed, I reproduce it here:

-- BEGIN FORWARDED MESSAGE --

This issue was very hard to nail down deterministically, and it's not
entirely clear where the bug lies. Mac OSX has new restrictions on what can
be done within a fork as described in the section on "forking" in
http://developer.apple.com/releasenotes/CoreFoundation/CoreFoundation.html
. The error they discuss there looks like this:

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.

To reproduce this error with processing, I cannot explain why it is these
two particular libraries but they both must be present for it to occur:
urllib2 and uuid. Here is a sample:

import multiprocessing
import urllib2
import uuid

def handle():
    urllib2.urlopen("http://www.google.com")

p = multiprocessing.Process(target=handle)
p.start()

If you remove the "import uuid", the program executes successfully, and
also executes successfully if you replace the usage of "urllib2" with
something else.

I would also note that this bug does *not* occur when using the
"multiprocessing" package in python 2.6 or 3.0.

---- END FORWARDED MESSAGE ----

I could also attach a problem report that gets spewed out (the program
actually crash) if that helps to diagnose the problem.

Taro

Original issue reported on code.google.com by nomo...@gmail.com on 11 Nov 2009 at 6:21