Hello Carsten, when shutting down the server using multicast communication the app seems to stuck in the destructor of PointMCastConnection in line
BaseThread::join(_recvQueueThread); When debugging, the recvThread of PointMCastConnection seems to be running when I try to stop the server. Somehow the join & shutdown of this thread seems not to work as expected. I'm calling ClusterServer::stop() after sync and before rendering the frame. I have no clue why the join never happens. Do you have further ideas? Thanks & Best regards, Michael P.S. this is my stop() method void VDTClusterServer::stop() { std::cout << "Trying to stop cluster server..." << std::endl; if(_clusterWindow != NullFC) { // get aspect ownership _aspect=_clusterWindow->getNetwork()->getAspect(); _clusterWindow->getNetwork()->setAspect(NULL); // destroy connection try { std::cout << "Trying to delete connection..." << std::endl; if(_clusterWindow->getNetwork()->getMainConnection()) { delete _clusterWindow->getNetwork()->getMainConnection(); } } catch(...) {} _clusterWindow->getNetwork()->setMainConnection(NULL); } // destroy aspect try { std::cout << "Trying to delete aspect..." << std::endl; if(_aspect) delete _aspect; _aspect = NULL; } catch(...) { } // reset _connection=NULL; _clusterWindow=NullFC; _renderChannel=NullFC; _running = false; std::cout << "cluster server successfully stopped..." << std::endl; } -------- Original-Nachricht -------- > Datum: Tue, 06 Sep 2011 09:24:20 -0500 > Von: Carsten Neumann <carsten_neum...@gmx.net> > An: opensg-users@lists.sourceforge.net > Betreff: Re: [Opensg-users] OpenSG1.8 - Disconnecting > ClusterWindow and ClusterServer > Hello Michael, > > On 09/05/2011 08:07 AM, Michael Raab wrote: > > Client side: > > I have a RenderChannel fc for each connected server. The RenderChannel > knows if it is connected and what its channel number is. > > If someone decides to disconnect one RenderChannel, the appropriate fc > is marked as disconneted (simple boolean field) and pushed into a local list > of the client. > > After next sync is finished all RenderChannels in this list will be > disconnected from the group connection of the client by calling > GroupConnection::disconnect(Channel c). > > > > Server side: > > Each server knows about the RenderChannel fc that represents the server > on the client side. After each sync the server checks whether the > RenderChannel was marked as disconnected. Once noticed I call > ClusterServer::stop() > and return from the render loop. > > hmm, this means there is sort of a race which side gets to close the > connection, depending on whether the server first notices that it should > exit or if the client completes the sync first and processes the list of > servers to disconnect. > It would probably be more reliable (if nothing else because it can be > tested better) to always have one side to close the connection first. > > > Problems: > > 1.) The cluster server stucks inside the stop() call while trying to > delete the RemoteAspect. Seems that there arises some infinte loop in the > destructor. > > that only seems possible if some FC never reaches a ref count of zero > and/or does not deregister itself from the FC factory. > > > 2.) After disconnecting the server, the client renders correct for some > seconds, then the following exception is thrown: > > > > FATAL: Writer Proc crashed SocketLib: select() 10022 WSAEINVAL > > > > The error seems to arise in SocketSelection::select() and seems to be > catched in GroupMCastConnection::sendQueueThread() > > > > After that point rendering stops on client side, seems to be another > deadlock situation. > > > > Any ideas? I'm kind of confused by the network stuff :-( > > sorry, only the obvious suggestion to try to find out what is causing > select() to fail - my guess would be that the server closed the > connection first and now the client attempts to do a select on a > disconnected socket or something along those line. > > Cheers, > Carsten > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > Opensg-users mailing list > Opensg-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/opensg-users -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de ------------------------------------------------------------------------------ Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users