Discussion:
ORBThreadPerConnection associated with ORBConnLimit options
Michele Nuovo
2008-12-02 11:09:16 UTC
Permalink
Hi All,



We've developed successfully and with a really positive feedback a real
time client/server application

beetwen java client (using SUN ORB) and a c++ server (using MICO ORB).



We've used consciousness ORBThreadPerConnection option with ORBConnLimit
onto MICO ORB to place a limit on the number of client

that could connect to the multithread server.



The problem is:



It seems to be that with a standalone client application we have no
problem. On the exit we've no thread leaks.



When we delegate the exit of the application to the destroy call on SUN
ORB, we've a thread leak on the MICO ORB.



Consequently when we reach the ORBConnLimit no other clients could
connect.



Looking to the web we've found that SUN ORB destroy call doesn't
release propertly opened connections.

but some threads on MICO ORB seems to be locked on a binary semaphore
(looking with gdb).







#0 0xffffe410 in ?? ()

#1 0x4e4ef9e8 in ?? ()

#2 0x00000000 in ?? ()

#3 0x00000000 in ?? ()

#4 0x410914c4 in ***@GLIBC_2.0 () from /lib/tls/libpthread.so.0

#5 0x4097a63c in __JCR_LIST__ () from
/opt/mico-2.3.12_mt/lib/libmico2.3.12_mt.so

#6 0x408170bf in MICOMT::Semaphore::wait (this=0x80faa34) at
pthreads.h:472

#7 0x4081b444 in MICO::WorkerThread::wait_for_state_change
(this=0x80fa9e0) at mt_manager.h:161

#8 0x4081a691 in MICO::WorkerThread::_run (this=0x80fa9e0,
arg=0x80fa9e0) at mt_manager.cc:340

#9 0x40812cc5 in MICOMT::Thread::_thr_startup (this=0x80fa9e0,
arg=0x80fa9e0) at pthreads.cc:145

#10 0x40812c7d in MICOMT::Thread::ThreadWrapper (arg=0x80fa9e0) at
pthreads.cc:125

#11 0x4108d9ed in start_thread () from /lib/tls/libpthread.so.0

#12 0x412799ca in clone () from /lib/tls/libc.so.6





We want to avoid to depend on client exit (client could exit brutally
depending on network resources) and need support to look at how the
ORBThreadPerConnection works associated with ORBConnLimit option to
avoid thread leaks.

Main problem is: How these threads are instantiated?



Thanks in advance for your support.



Best Regards,



MN

Loading...