[omniORB] Problems shutting down OmniORB
Nickolay Samofatov
skidder at bssys.com
Mon Sep 29 20:23:47 BST 2003
Hello, All !
My name is Nickolay Samofatov, I'm Firebird DBMS (www.firebirdsql.org)
core engine developer and I managed to create large distributed
infrastructure for BSS company using OpenORB at server side and
OmniORB at Win32 client side.
Here is my problem. I created DLL that does mapping from CORBA
interfaces of my application server to ATL COM objects. This DLL is
compiled and linked statically with MSVC.
Everything worked fine for very long time as long clients of my COM
objects used single COM apartment closed at program termination.
Last time I recompiled this DLL early in 2001 with OmniORB 3.0.3.
New clients tried to use my original DLL having multiple COM
apartments created dynamically. When all apartments are closed (via
CoUninitialize) my DLL is getting unloaded by Windows. At this point
DLL host process quickly terminates. Research have shown that OmniORB
service threads are still running but DLL is already unmapped from
memory and this condition causes unhandled access violation in this
threads at IP register location.
If I do orb->destroy() in DllMain on detach of process this fixes this
particular condition, but introduces another problem. Common case when
COM apartment is never closed stops working. orb->destroy() call is
waiting infinitely in omniAsyncInvoker::~omniAsyncInvoker().
Research shows that if DllMain with DLL_PROCESS_DETACH is invoked from
TerminateProcess when all application threads including OmniORB
service threads are already forcedly terminated by Windows.
OmniORB is endlessly waiting for already terminated threads to exit
normally in this case.
I'm not familiar with OmniORB source yet.
My question is if someone else stepped on the same problem already and
if the cure for the it is readily available.
Another question is where do I find rules about patches format to be
accepted by OmniORB development group if I have to fix explained
problem myself.
--
Best regards,
Nickolay Samofatov mailto:skidder at bssys.com
More information about the omniORB-list
mailing list