[omniORB] FW: Where to place ORB->run() in multithreaded applications

ERIKSSON,TOBIAS (A-Sweden,ex1) tobias_eriksson@agilent.com
Thu, 16 Nov 2000 14:52:11 +0100


 
 
Hi
 I'm struggling with some problems, where I when the system is brought down
gives me a SIGABRT (signal 6). This all happens when I do ORB->shutdown() in
one of my threads, from the stack trace I see that it does alot of stuff to
bring the ORB and POA down. I always end up at the same location when it
fails, however it does not fail every time, perhaps every 8:th time. 
The stacktrace is below.
 Anyway I read in "Advanced CORBA programming in C++" Henning Vinoski, that
sometimes depending on the implementation of the ORB etc one has to let the
main-thread execute the ORB->run().  I however, made a new thread that
executes the ORB->run() call. 
Has anyone else done this? How do you execute your ORB->run() ?
 
/Tobias 
 
 
#0 0x401a39da in sigsuspend (...) from /lib/libc.so.6
#0 0x401a39da in sigsuspend (...) from /lib/libc.so.6
#1 0x40020c77 in __pthread_wait_for_restart_signal (...)
from/lib/libpthread.so.0
#2 0x4001e6f7 in pthread_join (...) from /lib/libpthread.so.0
#3 0x4011fede in omni_thread::join (...) at ../posix.cc:606
#4 0x400c8f75 in tcpSocketIncomingRope::cancelThreads (...)
at../tcpSocketMTfactory.cc:795
#5 0x400c8039 in tcpSocketMTincomingFactory::stopIncoming (...)
at../tcpSocketMTfactory.cc:475
#6 0x400880ec in omniObjAdapter::adapterInactive (...)
at../objectAdapter.cc:267
#7 0x400914b3 in omniOrbPOA::do_destroy (...) at ../poa.cc:1652
#8 0x4008b3fc in omniOrbPOA::destroy (...) at ../poa.cc:527
#9 0x400923db in omniOrbPOA::shutdown (...) at ../poa.cc:1887
#10 0x400a8d29 in omniOrbORB::actual_shutdown (...) at ../corbaOrb.cc:573
#11 0x400a8fb3 in omniOrbORB::do_shutdown (...) at ../corbaOrb.cc:634
#12 0x400a8834 in omniOrbORB::shutdown (...) at ../corbaOrb.cc:478
#13 0x8069a3f in ORBThread::shutdown (...) at ORBThread.cpp:62
#14 0x805c612 in Settings::~Settings (...) at Settings.cpp:2477
#15 0x8065c18 in Serv::~Serv (...) at Serv.cpp:879
#16 0x8073cad in main (...) at ConMain.cpp:97