Home Help Center

GUI hangs on communicator shutdown

n2503vn2503v Member Alex MakarenkoOrganization: ACFR, University of SydneyProject: Orca ✭✭✭
I'm running a Qt-based GUI configured with Ice::Dispatcher.
Ice::Application is configured with Ice::NoSignalHandling.
The GUI uses an IceGrid Registry.

When the user tells the GUI to Quit, all widgets close and Ice::Communicator::shutdown() is called. Most of the time, everything shuts down cleanly but sometimes the process hangs. A gdb backtrace in the hanging state is below. The registry is running just fine and, after a Ctrl-C, the same GUI comes up without a problem.

Any ideas on what's happening here? Does it have anything to do with Dispatcher?


Ice-3.4.0 with patches 1 & 2, Linux, gcc-4.3.2
(gdb) where
#0 0xb7fde424 in __kernel_vsyscall ()
#1 0xb543a025 in [email protected]@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2 0xb55377fd in pthread_cond_wait () from /lib/i686/cmov/libc.so.6
#3 0xb7d609ca in IceUtil::Cond::waitImpl<IceUtil::Mutex> (this=0xa20ed74, mutex=@0xa20eda4) at ../../include/IceUtil/Cond.h:215
#4 0xb7d89db8 in IceUtil::Monitor<IceUtil::Mutex>::wait (this=0xa20ed74) at ../../include/IceUtil/Monitor.h:152
#5 0xb7d85891 in IceInternal::ConnectRequestHandler::getConnection (this=0xa20ed60, waitInit=true) at ConnectRequestHandler.cpp:280
#6 0xb7d85f2b in IceInternal::ConnectRequestHandler::sendRequest (this=0xa20ed60, out=0xbfff6fd4) at ConnectRequestHandler.cpp:219
#7 0xb7e78d8f in IceInternal::Outgoing::invoke (this=0xbfff6fd4) at Outgoing.cpp:180
#8 0xb7e2cd20 in IceDelegateM::Ice::LocatorRegistry::setAdapterDirectProxy (this=0x9f21dc0, id=@0x9f1f71c, proxy=@0xbfff76e4, __context=0x0) at Locator.cpp:1648
#9 0xb7e2fba7 in IceProxy::Ice::LocatorRegistry::setAdapterDirectProxy (this=0x9f21d88, id=@0x9f1f71c, proxy=@0xbfff76e4, __ctx=0x0) at Locator.cpp:1173
#10 0xb7e5f583 in IceProxy::Ice::LocatorRegistry::setAdapterDirectProxy (this=0x9f21d88, id=@0x9f1f71c, proxy=@0xbfff76e4) at ../../include/Ice/Locator.h:868
#11 0xb7e512d3 in Ice::ObjectAdapterI::updateLocatorRegistry (this=0x9f1f6a0, locatorInfo=@0xbfff76bc, proxy=@0xbfff76e4, registerProcess=false) at ObjectAdapterI.cpp:1311
#12 0xb7e5da78 in Ice::ObjectAdapterI::deactivate (this=0x9f1f6a0) at ObjectAdapterI.cpp:268
#13 0xb7e4db56 in IceUtilInternal::VoidMemFun<Ice::ObjectAdapter, IceUtil::Handle<Ice::ObjectAdapter> >::operator() (this=0xbfff778c, handle=
{<IceUtil::HandleBase<Ice::ObjectAdapter>> = {_ptr = 0xbfff7768}, <No data fields>}) at ../../include/IceUtil/Functional.h:65
#14 0xb7e4e2e2 in std::for_each<std::_List_iterator<IceUtil::Handle<Ice::ObjectAdapterI> >, IceUtilInternal::VoidMemFun<Ice::ObjectAdapter, IceUtil::Handle<Ice::ObjectAdapter> > > (__first={_M_node = 0xa14f650}, __last={_M_node = 0xbfff77c8}, __f=
{<std::unary_function<IceUtil::Handle<Ice::ObjectAdapter>, void>> = {<No data fields>}, _mfn = &virtual table offset 40}) at /usr/include/c++/4.3/bits/stl_algo.h:3791
#15 0xb7e4c934 in IceInternal::ObjectAdapterFactory::shutdown (this=0x9f1ca70) at ObjectAdapterFactory.cpp:51
#16 0xb7d7f431 in Ice::CommunicatorI::shutdown (this=0x9f1a110) at CommunicatorI.cpp:143
#17 0x080518bf in sysadminview::Component::start (this=0xbfff80c4) at /home/mradmin/mrsrc/shh/src/components/sysadminview/component.cpp:73
#18 0xb6eeec64 in orcaice::Application::run (this=0xbfff8118, argc=1, argv=0xbfff81f4) at /home/mradmin/mrsrc/orca/src/libs/orcaice/application.cpp:185
#19 0xb7d5b9f8 in Ice::Application::doMain (this=0xbfff8118, argc=1, argv=0xbfff81f4, initializationData=@0xbfff8034) at Application.cpp:654
#20 0xb7d5c90f in Ice::Application::main (this=0xbfff8118, argc=1, argv=0xbfff81f4, initData=@0xbfff8034) at Application.cpp:403
#21 0xb6eed3a5 in orcaice::Application::orcaMain (this=0xbfff8118, argc=1, argv=0xbfff81f4, dispatcher=0x9f19190) at /home/mradmin/mrsrc/orca/src/libs/orcaice/application.cpp:116
#22 0x080520c8 in main (argc=1, argv=0xbfff81f4) at /home/mradmin/mrsrc/shh/src/components/sysadminview/main.cpp:11


  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Alex,

    Your stack trace shows that your GUI is attempting to contact the IceGrid registry (Ice Locator) during the deactivation of one its object adapters (an "indirect" adapter). That's expected, although I don't know why this blocks. Is there other threads in your program at that point?

    Your situation is a bit unusual: typically, a server with an indirect object adapter is started by IceGrid (an IceGrid node) and does not have a GUI.

    If you don't need an indirect object adapter (i.e. a direct adapter would do as well if not better), the adapter deactivate would not call out, which would resolve this issue.

    Best regards,
  • n2503vn2503v Member Alex MakarenkoOrganization: ACFR, University of SydneyProject: Orca ✭✭✭
    Hi Bernard,

    to answer your question... yes, there're other threads, 6 in total. One of them is ours the others are in the Ice thread pools. Nothing interesting in the stack traces.

    I followed your suggestion and disabled adapter registration for the GUI, it's true that it's not needed it in this case.

    Thanks for your help,
  • same problem


    I have the same problem: i using qt-gui and communicator shutdown hangs ...
    It's resolved by using direct proxys but i strongly needs indirect bindings ...
    Have you any another ideas around this problem ?
Sign In or Register to comment.