[omniORB] Single thread hanging...
Mark Zimmerman
markzimm@frii.com
Thu Sep 5 22:53:01 2002
On Thu, Sep 05, 2002 at 06:14:21PM +0100, Marcus MacWilliam wrote:
> Hello,
>
> I am using the following software:
>
> Solaris 8, gcc v3.1, gdb 5.2, python 1.5.2, OmniORB v3.0.5.
>
> I initialise my own server POA to have SINGLE_THREAD_MODEL
> as its thread policy, all the others are as the "RootPOA".
>
> OK, the problem is when I pass a CORBA object as a parameter to
> a method, and attempt to call a method on the passed object. The server
> just freezes. (This works fine on NT).
>
> Example:
>
> void CMyObject::doSomething( MySecondObject_ptr obj2 )
> {
> obj2->method(); // Call to method() freezes the server.
> }
>
> The server hangs trying to call the method() on the passed object..
>
> If I change the thread policy to ORB_CTRL_MODEL, it works fine,
> but defeats the object. The CORBA server MUST be single threaded,
> because the
> CORBA server is acting as a client to another server using sockets. And
> that
> other server is single threaded. (As is the client code within the CORBA
> server).
>
> Does anyone know why invoking a method on a CORBA object from within my
> server causes the server to freeze. The output from gdb, is as follows:
>
> where:
> #0 0xfeb19c64 in _lwp_sema_wait () from /usr/lib/libc.so.1
> #1 0xfe9497fc in _park () from /usr/lib/libthread.so.1
> #2 0xfe9494d8 in _swtch () from /usr/lib/libthread.so.1
> #3 0xfe947c2c in cond_timedwait () from /usr/lib/libthread.so.1
> #4 0xfe9479d8 in pthread_cond_timedwait () from /usr/lib/libthread.so.1
>
--snip--
Try adding /usr/lib/lwp to your LD_LIBRARY_PATH. This will give you a
better thread library. If you search deep enough in the Sun problem
reports you will find that they have abandoned all hope of fixing all
of the problems in the /usr/lib/libthread.so.1 version on Solaris 8.
The new design in /usr/lib/lwp/libthread.so.1 is the default thread
library in Solaris 9.
-- Mark