[omniORB] Possible deadlock in omniORB internals (3.0.x) x=1

ERIKSSON,TOBIAS (A-Sweden,ex1) tobias_eriksson@agilent.com
Wed, 28 Feb 2001 14:16:19 +0100


Hi
 A couple of times I've had this problem, the application can not end due to
that the 
omniORB object is hanging on a wait()-call to a condition. When I attached
gdb to the process
the situation was like below, a total of 4 threads. Where two of them as can
be seen from the 
stack trace below are waiting on a wait()-call to a condition, the same
condition cause the "this" pointers are the same 0x4011a18c. The threads are
thread 2 and 6.
I also had 3 defunct threads that I could not look at, I guess that anyone
of these is 
the one that is suppose to send the signal to the condition.

 Any thoughts or ideas?

Regards
 Tobias

(gdb) info threads
  6 Thread 31193  0x401a29da in sigsuspend () from /lib/libc.so.6
  3 Thread 31190  0x401a29da in sigsuspend () from /lib/libc.so.6
* 2 Thread 31188 (initial thread)  0x4001ca67 in pthread_cond_wait () from
/lib/libpthread.so.0
  1 Thread 31189 (manager thread)  0x40219530 in poll () from
/lib/libc.so.6


(gdb) 
(gdb) 
(gdb) thread 1
[Switching to thread 1 (Thread 31189 (manager thread))]
#0  0x40219530 in poll () from /lib/libc.so.6
(gdb) bt
#0  0x40219530 in poll () from /lib/libc.so.6
#1  0x4001d9bb in __pthread_manager () from /lib/libpthread.so.0
(gdb) thread 2
[Switching to thread 2 (Thread 31188 (initial thread))]
#0  0x4001ca67 in pthread_cond_wait () from /lib/libpthread.so.0
(gdb) bt
#0  0x4001ca67 in pthread_cond_wait () from /lib/libpthread.so.0
#1  0x4011e34e in omni_condition::wait (this=0x4011a18c) at
../posix.cc:147
#2  0x400a7f5f in omniOrbORB::do_shutdown (this=0x822edd0,
wait_for_completion=true)
    at ../corbaOrb.cc:623
#3  0x400a7911 in omniOrbORB::destroy (this=0x822edd0) at
../corbaOrb.cc:496
#4  0x8067bc3 in Settings::~Settings (this=0x822be58, __in_chrg=3) at
Settings.cpp:2685
#5  0x8079cda in Serv::~Serv (this=0x822be30, __in_chrg=3) at Serv.cpp:955
#6  0x805603e in main (argc=4, argv=0xbffff6a4) at ConMain.cpp:97
(gdb) thread 3
[Switching to thread 3 (Thread 31190)]
#0  0x401a29da in sigsuspend () from /lib/libc.so.6
(gdb) bt
#0  0x401a29da in sigsuspend () from /lib/libc.so.6
#1  0x4001fc77 in __pthread_wait_for_restart_signal () from
/lib/libpthread.so.0
#2  0x4001cad0 in pthread_cond_wait () from /lib/libpthread.so.0
#3  0x4011e34e in omni_condition::wait (this=0x822cc5c) at ../posix.cc:147
#4  0x400e4b49 in omniORB_Ripper::run_undetached (this=0x822cc08) at
../strand.cc:749
#5  0x4011e99f in omni_thread_wrapper (ptr=0x822cc08) at ../posix.cc:424
#6  0x4001dc8f in pthread_start_thread () from /lib/libpthread.so.0
(gdb) thread 4
Thread ID 4 not known.  Use the "info threads" command to
see the IDs of currently known threads.
(gdb) thread 5
Thread ID 5 not known.  Use the "info threads" command to
see the IDs of currently known threads.
(gdb) thread 6
[Switching to thread 6 (Thread 31193)]
#0  0x401a29da in sigsuspend () from /lib/libc.so.6
(gdb) bt
#0  0x401a29da in sigsuspend () from /lib/libc.so.6
#1  0x4001fc77 in __pthread_wait_for_restart_signal () from
/lib/libpthread.so.0
#2  0x4001cad0 in pthread_cond_wait () from /lib/libpthread.so.0
#3  0x4011e34e in omni_condition::wait (this=0x4011a18c) at
../posix.cc:147
#4  0x400a7693 in omniOrbORB::run (this=0x822edd0) at ../corbaOrb.cc:461
#5  0x8081278 in ORBThread::run (this=0x822fc08, args=0x0) at
ORBThread.cpp:39
#6  0x4011e97f in omni_thread_wrapper (ptr=0x822fc08) at ../posix.cc:421
#7  0x4001dc8f in pthread_start_thread () from /lib/libpthread.so.0
(gdb)