Zope 2.5.0b4/2.4.x crashes
In the continuing effort to figure out why a C-extension I've written works without error in the Python interpreter, yet causes Zope to terminate abnormally (with nary a traceback) I've started to explore the ExternalMethod code. Curious -- why does it use the method it does (apply(), etc) rather than simply importing the external module and calling the method? At this point, I'm wondering if the (transient, but fatal) error is in the Python interpreter itself, and triggers due to the way Zope handles external methods. The setup is as follows: Zope -> ExternalMethod object -> .py module with stubs to .dll functions -> .dll The crashes appear to happen on the call to the .dll file which, as I mentioned above, causes no errors when directly executed from the interpreter. The switch from 2.4.3 to 2.5.0b4 helped quite a bit, but the crashes still happen. The folks at Zope Collector are unable to suggest anything further. ---------- Keith J. Farmer kfarmer@thuban.org http://www.thuban.org
In the continuing effort to figure out why a C-extension I've written works without error in the Python interpreter, yet causes Zope to terminate abnormally (with nary a traceback) I've started to explore the ExternalMethod code.
Curious -- why does it use the method it does (apply(), etc) rather than simply importing the external module and calling the method?
At this point, I'm wondering if the (transient, but fatal) error is in the Python interpreter itself, and triggers due to the way Zope handles external methods.
Hi Keith - What does your C extension actually do? I saw a mention in your collector entry about a 'database' - is the .dll a hook into a database API? If so, I would highly suspect that the problem may have to with threading (which would explain why it "works" from a simple test within the Python interpreter). Without knowing the details I can't point you in any specific direction, but I've seen this time and time again with RDBMS integration extensions. One step you might take is to set up a Python-only test that uses the extension from multiple threads (to remove Zope from the mix and try to narrow the possibilities). Hope this helps! Brian Lloyd brian@zope.com Software Engineer 540.361.1716 Zope Corporation http://www.zope.com
participants (2)
-
Brian Lloyd -
Keith J. Farmer