[omniORB] Mystery Failure of C++ Python Extension Module Doesn't Kill Server

Lars Immisch lars@ibp.de
Sat, 30 Jun 2001 18:35:41 +0200


<nofill>Hi Eliot,

> I have a Python CORBA server using OmniORB.py that calls out to a C++
> Python extension module. Sometimes this extension module fails, with no
> exception getting back to my Python server code. However, this failure
> does not kill the server. But, it as it happens this particular code is
> synchronized using a Python lock, so when the extension method fails,
> the lock is never released and subsequent calls to the server will block
> on lock.acquire().
> 
> I'm wondering if anyone else has seen this type of failure and what sort
> of things might cause it? The extension module is a 3rd-party
> application, so I can't debug it directly, but when it fails, the only
> evidence is a CORBA unknown exception on the client.
</nofill>

I would guess that the exception is thrown in a CORBA upcall. This would
be executed in a separate thread and omniORBpy seems to catch the
exception. If you turn on ORBdebugLevel 1, you should see the exception
being caught by omniORB.


Your server doesn't exit because the exception is caught by omniORBpy.
Even if it wasn't caught, your server would not necessarily die because
the dying thread might not affect the process. At least I remember that
the python docs say that this is platform dependent, but I have no
experience with platforms that show this behaviour. On Linux (probably
pthreads in general) and Windows, a dying thread does not take the process
with it.


The interesting question is why you don't see the exception in your code.


- Lars