Results 1 to 4 of 4

Thread: GUI hangs on communicator shutdown

  1. #1
    n2503v is offline Registered User
    Name: Alex Makarenko
    Organization: ACFR, University of Sydney
    Project: Orca
    Join Date
    Jun 2005
    Posts
    134

    GUI hangs on communicator shutdown

    Hello,
    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?

    Cheers,
    Alex


    Ice-3.4.0 with patches 1 & 2, Linux, gcc-4.3.2

    (gdb) where
    #0 0xb7fde424 in __kernel_vsyscall ()
    #1 0xb543a025 in pthread_cond_wait@@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::setAdapterDire ctProxy (this=0x9f21dc0, id=@0x9f1f71c, proxy=@0xbfff76e4, __context=0x0) at Locator.cpp:1648
    #9 0xb7e2fba7 in IceProxy::Ice::LocatorRegistry::setAdapterDirectPr oxy (this=0x9f21d88, id=@0x9f1f71c, proxy=@0xbfff76e4, __ctx=0x0) at Locator.cpp:1173
    #10 0xb7e5f583 in IceProxy::Ice::LocatorRegistry::setAdapterDirectPr oxy (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::ObjectA dapter>, 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
    Alex Makarenko
    Marathon Robotics
    project: multi-robot systems

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    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,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  3. #3
    n2503v is offline Registered User
    Name: Alex Makarenko
    Organization: ACFR, University of Sydney
    Project: Orca
    Join Date
    Jun 2005
    Posts
    134
    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,
    Alex
    Alex Makarenko
    Marathon Robotics
    project: multi-robot systems

  4. #4
    Maxim Pudovkin is offline Registered User
    Name: Max Pudovkin
    Organization: Tver State Technic University
    Project: distributed workflow automation system
    Join Date
    May 2011
    Posts
    5

    same problem

    Hi,

    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 ?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Calling communicator.destroy() from a JVM shutdown hook
    By Alexey Romanov in forum Help Center
    Replies: 3
    Last Post: 05-05-2010, 03:40 PM
  2. IceStorm hangs
    By ctennis in forum Help Center
    Replies: 5
    Last Post: 05-22-2008, 08:21 AM
  3. Ice.Communicator.shutdown() not working
    By Djaunl in forum Help Center
    Replies: 2
    Last Post: 06-18-2007, 03:26 PM
  4. python: shutdown of communicator hangs
    By hiasl in forum Help Center
    Replies: 6
    Last Post: 02-05-2007, 01:50 PM
  5. Notification on communicator shutdown
    By stephan in forum Help Center
    Replies: 11
    Last Post: 10-13-2004, 04:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •