[omniORB] Single thread hanging...

Marcus MacWilliam marcusma@lsl.co.uk
Thu Sep 5 18:15:02 2002


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

#5  0xff382a70 in omni_condition::timedwait(unsigned long, unsigned
long) ()
   from
/export/home/marcusma/omniorb-3.0.5/lib/sun4_sosV_5.8/libomnithread.so.2

#6  0xff2bb07c in ?? () from
/export/home/marcusma/omniorb-3.0.5/lib/sun4_sosV_5.8/libomniORB3.so.0
#7  0xff3837c4 in omni_thread_wrapper () from
/export/home/marcusma/omniorb-3.0.5/lib/sun4_sosV_5.8/libomnithread.so.2

info thread:
  6 LWP    2          0xfeb19634 in _signotifywait () from
/usr/lib/libc.so.1
  5 LWP    3          0xfeb19c18 in ___lwp_cond_wait () from
/usr/lib/libc.so.1
  4 LWP    5          0xfeb19c64 in _lwp_sema_wait () from
/usr/lib/libc.so.1
  3 LWP    6          0xfeb171f8 in door_restart () from
/usr/lib/libc.so.1
  2 LWP    4          0xfeb16928 in _so_accept () from
/usr/lib/libc.so.1
* 1 LWP    1          0xfeb19c64 in _lwp_sema_wait () from
/usr/lib/libc.so.1

Any help greatly appreciated, Cheers,
--
 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)