[omniORB] Single thread hanging...

Marcus MacWilliam marcusma@lsl.co.uk
Fri Sep 6 11:08:01 2002


Mark Zimmerman wrote:

> 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
> _______________________________________________
> omniORB-list mailing list
> omniORB-list@omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list

This didn't make a difference, I still hung in the same place.
The stack from gdb differed only in that entries that used to say:

/usr/lib/libthread.so.1, now say /usr/lib/lwp/libthread.so.1.

Anyone else got any ideas?
--
 Marcus A.T MacWilliam, MSc, CEng, MBCS, BSc(Hons).
 Senior Software Engineer, Laser-Scan Ltd.
 Tel: +44 (0)1223 420414 x213. Mobile: +44 (0)7803 706597.
 TravelM8: 09050 505050 (http://www.travelm8.com)