Hi,

Once more looking at the problem that keeps on giving. In short:
        http://code.activestate.com/lists/pythonmac-sig/22224/

Hard crash flagged with:
        USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER

Background:
A helpful person on the twisted.web list found that loading specific modules 
(pyobjc, Quartz)  before a script was daemonized causes OSX 10.6 to crash. He 
fixed my test script by delaying OSX specific modules until after daemosing. 
The test script works locally. However, running the same test script on a mac 
mini server still has the same (or similarly flagged) crash. Both machines have 
the same python version, OSX version, pyobjc, twisted versions, 64bit, even 
user ID. Running it remotely via SSH or in a GUI yields the same results, (ssh 
into local machine, script works, ssh into remote machine, script doesn't work, 
screensharing into remote machine, script doesn't work)

Problem:
Another helpful person suggested there might be other modules that get loaded 
before daemonising. So I dumped sys.modules before and after daemonising, both 
local and remote, and compared. On the remote machine the MacOS and Carbon 
modules are loaded before daemonising, on the local machine they're not. (NB, I 
don't know if these imports are relevant to the Fork crash, but it seems 
prudent to find out). 
None of the modules called by my test script call Carbon directly but I found 
this line in a zope init, (a dependency of twisted) loads Carbon.  The cryptic 
import:

__import__('pkg_resources').declare_namespace(__name__)

I don't know what this means. Which conditions on the remote machine would 
cause this line to load Carbon?

#Test:
import sys
def printCarbonLoaded(when):
    print ("%s carbon is"%when), "Carbon" in sys.modules.keys()

printCarbonLoaded("1")
__import__('pkg_resources').declare_namespace(__name__)
printCarbonLoaded("2")

Results:
local machine:
1 carbon is False
2 carbon is False

remote machine:
1 carbon is False
2 carbon is True

Many thanks,
Erik
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to