Home Help Center

Does ice_timeout() not work ?

fengxbfengxb Member feng xuebinOrganization: jiexin techProject: scientific calculation
Hello every body :) I have write a thread called ItemSubscriber,and it inherit from IceUtil::Thread
In the override run method,I get the TopicManagerPrx timely ,and if it it failing
I will resubscribe the topic
And in the following is the ItemSubscriber's run method

void ItemSubscriber::run()
{
bool bSub = Subscribe();
while(1)
{
sleep(1);
try
{
IceStorm::TopicManagerPrx pingPrx = IceStorm::TopicManagerPrx::checkedCast(
_pServer->communicator()->stringToProxy(_sTopicManagerProxy)->ice_timeout(1000));

pingPrx->ice_ping();
if(_ping_filure_count >= 3)
{
_ping_filure_count = 0;
Subscribe();
}
}
catch(...)
{
CLogger::WriteLog(LEVEL_ERROR,"ping IceStorm failed");
_ping_filure_count ++;
}
}
}

But sometimes itis looks like the ItemSubscriber::run() was block in IceStorm::TopicManagerPrx::checkedCast(),and it lead
Other Threads blocked and waiting in OutgoingConnectionFactory::findConnection()

In the following code,Thread 29 is the ItemSubscriber Thread's stack traces
and Thread 19 is the blocked Thread's stack traces

So,I want to know does ice_timeout not work ?and why It stop in ConnectionI::isActiveOrHolding()? Thanks:)
Thread 29 (system thread 2467595):
#0  0x60000000c02a6bd0:0 in __ksleep+0x30 () from /usr/lib/hpux32/libc.so.1
#1  0x60000000c038d6c0:0 in __mxn_sleep+0xab0 ()
   from /usr/lib/hpux32/libpthread.so.1
#2  0x60000000c034bd10:0 in <unknown_procedure> + 0x4a0 ()
   from /usr/lib/hpux32/libpthread.so.1
#3  0x60000000c034ff10:0 in pthread_mutex_lock+0x170 ()
   from /usr/lib/hpux32/libpthread.so.1
warning:
ERROR: Use the "objectdir" command to specify the search
path for objectfile ConnectionI.o.
If NOT specified will behave as a non -g compiled binary.

#4  0x60000000cb96aa20:0 in Ice::ConnectionI::isActiveOrHolding() const+0x80 ()
   from /opt/Ice-3.3.0/cpp/lib/libIce.33
#5  0x60000000cb8ce2b0:0 in IceInternal::OutgoingConnectionFactory::findConnection(std::vector<IceInternal::Handle<IceInternal::EndpointI>,std::allocator<IceInternal::Handle<IceInternal::EndpointI> > > const&,bool&)+0x310 ()
---Type <return> to continue, or q <return> to quit---
   from /opt/Ice-3.3.0/cpp/lib/libIce.33
#6  0x60000000cb8d8aa0:0 in IceInternal::OutgoingConnectionFactory::create(std::vector<IceInternal::Handle<IceInternal::EndpointI>,std::allocator<IceInternal::Handle<IceInternal::EndpointI> > > const&,bool,Ice::EndpointSelectionType,IceUtil::Handle<IceInternal::OutgoingConnectionFactory::CreateConnectionCallback> const&)+0x110 () from /opt/Ice-3.3.0/cpp/lib/libIce.33
#7  0x60000000cbebb010:0 in IceInternal::RoutableReference::createConnection(std::vector<IceInternal::Handle<IceInternal::EndpointI>,std::allocator<IceInternal::Handle<IceInternal::EndpointI> > > const&,IceUtil::Handle<IceInternal::Reference::GetConnectionCallback> const&) const+0x410 ()
   from /opt/Ice-3.3.0/cpp/lib/libIce.33
#8  0x60000000cbeb0270:0 in IceInternal::RoutableReference::getConnectionNoRouterInfo(IceUtil::Handle<IceInternal::Reference::GetConnectionCallback> const&) const+0x70 () from /opt/Ice-3.3.0/cpp/lib/libIce.33
#9  0x60000000cbead870:0 in IceInternal::RoutableReference::getConnection(IceUtil::Handle<IceInternal::Reference::GetC
onnectionCallback> const&) const+0xbc0 ()
   from /opt/Ice-3.3.0/cpp/lib/libIce.33
#10 0x60000000cb894f70:0 in IceInternal::ConnectRequestHandler::connect()
   +0xa0 () from /opt/Ice-3.3.0/cpp/lib/libIce.33
#11 0x60000000cbe6f0b0:0 in IceDelegateM::Ice::Object::setup(IceInternal::Handle<IceInternal::Reference> const&,IceInternal::ProxyHandle<IceProxy::Ice::Object> const&,bool)+0x400 () from /opt/Ice-3.3.0/cpp/lib/libIce.33
#12 0x60000000cbe69050:0 in IceProxy::Ice::Object::createDelegate(bool)
---Type <return> to continue, or q <return> to quit---
   +0x820 () from /opt/Ice-3.3.0/cpp/lib/libIce.33
#13 0x60000000cbe5fab0:0 in IceProxy::Ice::Object::__getDelegate(bool)+0x580 ()
   from /opt/Ice-3.3.0/cpp/lib/libIce.33
#14 0x60000000cbe41690:0 in IceProxy::Ice::Object::ice_isA(std::basic_string<char,std::char_traits<char>,std::allocator<char> > const&,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> >>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const,std::basic_string<char,std::char_traits<char>,std::allocator<char> >> > > const*)+0x1b0 ()
   from /opt/Ice-3.3.0/cpp/lib/libIce.33
#15 0x44d40b0:0 in IceProxy::Ice::Object::ice_isA(std::basic_string<char,std::char_traits<char>,std::allocator<char> > const&)+0x40 ()

#16 0x4de6a30:0 in IceInternal::checkedCastImpl<IceInternal::ProxyHandle<IceProxy::IceStorm::TopicManager> >(IceInternal::ProxyHandle<IceProxy::Ice::Object> const&,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> >>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const,std::basic_string<char,std::char_traits<char>,std::allocator<char> >> > > const*)+0x1a0 ()
warning:
ERROR: Use the "objectdir" command to specify the search
path for objectfile ItemSubscriber.o.
If NOT specified will behave as a non -g compiled binary.

#17 0x4dfbc60:0 in ItemSubscriber::run()+0x4d0 ()
#18 0x60000000cc1fc770:0 in startHook(void*)+0x5c0 ()
---Type <return> to continue, or q <return> to quit---
   from /opt/Ice-3.3.0/cpp/lib/libIceUtil.33
#19 0x60000000c0334420:0 in __pthread_bound_body+0x170 ()
   from /usr/lib/hpux32/libpthread.so.1

  Thread 19 (system thread 2467285):
#0  0x60000000c02a6bd0:0 in __ksleep+0x30 () from /usr/lib/hpux32/libc.so.1
#1  0x60000000c038d6c0:0 in __mxn_sleep+0xab0 ()
   from /usr/lib/hpux32/libpthread.so.1
---Type <return> to continue, or q <return> to quit---
#2  0x60000000c034bd10:0 in <unknown_procedure> + 0x4a0 ()
   from /usr/lib/hpux32/libpthread.so.1
#3  0x60000000c034ff10:0 in pthread_mutex_lock+0x170 ()
   from /usr/lib/hpux32/libpthread.so.1
#4  0x60000000cb889140:0 in IceUtil::LockT<IceUtil::Monitor<IceUtil::Mutex> >::LockT(IceUtil::Monitor<IceUtil::Mutex> const&)+0x60 ()
   from /opt/Ice-3.3.0/cpp/lib/libIce.33
#5  0x60000000cb8cdfe0:0 in IceInternal::OutgoingConnectionFactory::findConnection(std::vector<IceInternal::Handle<IceInternal::EndpointI>,std::allocator<IceInternal::Handle<IceInternal::EndpointI> > > const&,bool&)+0x40 ()
   from /opt/Ice-3.3.0/cpp/lib/libIce.33
#6  0x60000000cb8d8aa0:0 in IceInternal::OutgoingConnectionFactory::create(std::vector<IceInternal::Handle<IceInternal::EndpointI>,std::allocator<IceInternal::Handle<IceInternal::EndpointI> > > const&,bool,Ice::EndpointSelectionType,IceUtil::Handle<IceInternal::OutgoingConnectionFactory::CreateConnectionCallback> const&)+0x110 () from /opt/Ice-3.3.0/cpp/lib/libIce.33
#7  0x60000000cbebb010:0 in IceInternal::RoutableReference::createConnection(std::vector<IceInternal::Handle<IceInternal::EndpointI>,std::allocator<IceInternal::Handle<IceInternal::EndpointI> > > const&,IceUtil::Handle<IceInternal::Reference::GetConnectionCallback> const&) const+0x410 ()
   from /opt/Ice-3.3.0/cpp/lib/libIce.33
#8  0x60000000cbeb0270:0 in IceInternal::RoutableReference::getConnectionNoRouterInfo(IceUtil::Handle<IceInternal::Reference::GetConnectionCallback> const&) con---Type <return> to continue, or q <return> to quit---
st+0x70 () from /opt/Ice-3.3.0/cpp/lib/libIce.33
#9  0x60000000cbead870:0 in IceInternal::RoutableReference::getConnection(IceUtil::Handle<IceInternal::Reference::GetConnectionCallback> const&) const+0xbc0 ()
   from /opt/Ice-3.3.0/cpp/lib/libIce.33
#10 0x60000000cb894f70:0 in IceInternal::ConnectRequestHandler::connect()
   +0xa0 () from /opt/Ice-3.3.0/cpp/lib/libIce.33
#11 0x60000000cbe6f0b0:0 in IceDelegateM::Ice::Object::setup(IceInternal::Handle<IceInternal::Reference> const&,IceInternal::ProxyHandle<IceProxy::Ice::Object> const&,bool)+0x400 () from /opt/Ice-3.3.0/cpp/lib/libIce.33
#12 0x60000000cbe69050:0 in IceProxy::Ice::Object::createDelegate(bool)
   +0x820 () from /opt/Ice-3.3.0/cpp/lib/libIce.33
#13 0x60000000cbe5fab0:0 in IceProxy::Ice::Object::__getDelegate(bool)+0x580 ()
   from /opt/Ice-3.3.0/cpp/lib/libIce.33
warning:
ERROR: Use the "objectdir" command to specify the search
path for objectfile IPSServer.o.
If NOT specified will behave as a non -g compiled binary.

#14 0x4935af0:0 in IceProxy::InfoProcess::IPSAlarmMng::ReportAlarm(std::vector<IceInternal::Handle<InfoProcess::IPSAlarmItem>,std::allocator<IceInternal::Handle<InfoProcess::IPSAlarmItem> > > const&,std::map<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> >>,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const,std::basic_string<char,std::char_traits<char>,std::allocator<char> >> > > const*)+0x1e0 ()
#15 0x4dbf8f0:0 in IceProxy::InfoProcess::IPSAlarmMng::ReportAlarm(std::vector<IceInternal::Handle<InfoProcess::IPSAlarmItem>,std::allocator<IceInternal::Handle---Type <return> to continue, or q <return> to quit---
<InfoProcess::IPSAlarmItem> > > const&)+0x40 ()
#16 0x4dbd0f0:0 in CIPSServerReportMng::ReportAlarm(std::vector<IceInternal::Handle<InfoProcess::IPSAlarmItem>,std::allocator<IceInternal::Handle<InfoProcess::IPSAlarmItem> > >&)+0x7b0 ()
#17 0x4daf080:0 in ReportAlarmItemJob::work()+0x100 ()
Sign In or Register to comment.