[omniORB] leak with omniORBpy on Python 2.5
Luke Deller
ldeller at iress.com.au
Fri Aug 15 18:54:49 BST 2008
Hello,
In omniORBpy-3.2 (and earlier versions too), the omniORB.omniThreadHook class relies on some knowledge of the internals of the python "threading" module. Unfortunately the threading module has changed slightly in Python 2.5 in a way which breaks omniThreadHook. In particular, the Thread.__delete method is no longer called when a thread terminates.
The consequence is that for threads created by the Python threading module (rather than by omniORB) which make CORBA calls, a C++ omni_thread instance will be leaked. On the Windows platform, this results in a leak of a thread and a semaphore handle. There seems to be a related memory leak, perhaps because the stack of the thread is not deallocated when the thread terminates.
Please find attached a small patch to resolve this leak. It still relies on some knowledge of the internals of the python threading module which is not ideal.
Kind regards,
Luke.
**********************************************************************************************
Important Note
This email (including any attachments) contains information which is confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, distribute or copy this email. If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this email are not necessarily the views of IRESS Market Technology Limited.
It is the duty of the recipient to virus scan and otherwise test the information provided before loading onto any computer system.
IRESS Market Technology Limited does not warrant that the information is free of a virus or any other defect or error.
**********************************************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: omni-py25threading.patch
Type: application/octet-stream
Size: 902 bytes
Desc: omni-py25threading.patch
Url : http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080815/9eba845c/omni-py25threading.obj
More information about the omniORB-list
mailing list