Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 02-10-2007
Yunqiao Yin's Avatar
Yunqiao Yin Yunqiao Yin is offline
Registered User
 
Name: Yin Yunqiao
Organization: Baosteel
Project: real time process control system
 
Join Date: Jan 2004
Location: China
Posts: 56
Unhappy Segmentation fault with Freeze

Ice:3.1.0 on Linux
===============
the call stack backtrace are:

Code:
operator new(unsigned long)
__gnu_cxx::new_allocator<Freeze::EvictorI::StreamedObject>::allocate(unsigned long, void const*)
std::_Deque_base<Freeze::EvictorI::StreamedObject, std::allocator<Freeze::EvictorI::StreamedObject> >::_M_allocate_node()
std::_Deque_base<Freeze::EvictorI::StreamedObject, std::allocator<Freeze::EvictorI::StreamedObject> >::_M_create_nodes(Free
ze::EvictorI::StreamedObject**, Freeze::EvictorI::StreamedObject**)
std::_Deque_base<Freeze::EvictorI::StreamedObject, std::allocator<Freeze::EvictorI::StreamedObject> >::_M_initialize_map(un
signed long)
std::_Deque_base<Freeze::EvictorI::StreamedObject, std::allocator<Freeze::EvictorI::StreamedObject> >::_Deque_base(std::all
ocator<Freeze::EvictorI::StreamedObject> const&, unsigned long)
std::deque<Freeze::EvictorI::StreamedObject, std::allocator<Freeze::EvictorI::StreamedObject> >::deque(std::allocator<Freez
e::EvictorI::StreamedObject> const&)
Freeze::EvictorI::run()
__clone2
and after the first segment fault, another segment fault occured,here are backtraces also:
Code:
__libc_free
operator delete(void*)
__gnu_cxx::new_allocator<IceInternal::Handle<IceInternal::EndpointI> >::deallocate(IceInternal::Handle<IceInternal::Endpoin
tI>*, unsigned long)
std::_Vector_base<IceInternal::Handle<IceInternal::EndpointI>, std::allocator<IceInternal::Handle<IceInternal::EndpointI> >
 >::_M_deallocate(IceInternal::Handle<IceInternal::EndpointI>*, unsigned long)
std::_Vector_base<IceInternal::Handle<IceInternal::EndpointI>, std::allocator<IceInternal::Handle<IceInternal::EndpointI> >
 >::~_Vector_base()
std::vector<IceInternal::Handle<IceInternal::EndpointI>, std::allocator<IceInternal::Handle<IceInternal::EndpointI> > >::~v
ector()
IceInternal::DirectReference::~DirectReference()
IceInternal::decRef(IceInternal::Reference*)
IceInternal::Incoming::invoke(IceInternal::Handle<IceInternal::ServantManager> const&)
Ice::ConnectionI::invokeAll(IceInternal::BasicStream&, int, int, unsigned char, IceInternal::Handle<IceInternal::ServantMan
ager> const&, IceInternal::Handle<Ice::ObjectAdapter> const&)
Ice::ConnectionI::message(IceInternal::BasicStream&, IceInternal::Handle<IceInternal::ThreadPool> const&)
IceInternal::ThreadPool::run()
IceInternal::ThreadPool::EventHandlerThread::run()
__clone2
This phenomenon was found only once, because I install a signal handler for [segment fault] signals, after the segment fault occured,the process didn't exit but hanged. I am very confused about that. Would you please give some advice?

Thanks a lot.
__________________
Yunqiao Yin
Baosteel
real-time process control
ICE中文论坛http://lingdoo.just.as 欢迎大家捧场
Reply With Quote
  #2 (permalink)  
Old 02-10-2007
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,061
From this information its pretty hard to tell what exactly is going on other than you have gotten some sort of memory corruption. You might want to try running with some memory corruption tool such as purify, or perhaps valgrind. You could also attach gdb to the application at startup and then catch the segfault when it occurs and check out the state of memory and threads.

Since this is occuring with Freeze perhaps you are not synchronizing correctly? Are you following the advice in the Freeze chapter (ie: inheriting from IceUtil::AbstractMutex, etc) and ensuring that you protect state correctly in the servant?
Reply With Quote
  #3 (permalink)  
Old 02-12-2007
Yunqiao Yin's Avatar
Yunqiao Yin Yunqiao Yin is offline
Registered User
 
Name: Yin Yunqiao
Organization: Baosteel
Project: real time process control system
 
Join Date: Jan 2004
Location: China
Posts: 56
Quote:
Originally Posted by matthew View Post
From this information its pretty hard to tell what exactly is going on other than you have gotten some sort of memory corruption. You might want to try running with some memory corruption tool such as purify, or perhaps valgrind. You could also attach gdb to the application at startup and then catch the segfault when it occurs and check out the state of memory and threads.

Since this is occuring with Freeze perhaps you are not synchronizing correctly? Are you following the advice in the Freeze chapter (ie: inheriting from IceUtil::AbstractMutex, etc) and ensuring that you protect state correctly in the servant?
All my servants have inherited IceUtil::AbstractMutex, I'll recheck my codes.Thank you!
__________________
Yunqiao Yin
Baosteel
real-time process control
ICE中文论坛http://lingdoo.just.as 欢迎大家捧场
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Segmentation fault in Icestorm davidcr1983 Help Center 4 08-08-2006 10:37 AM
IceInternal::incRef segmentation fault xdm Help Center 2 06-02-2006 03:44 PM
icegridregistry Segmentation fault on shutdown xdm Help Center 2 01-08-2006 09:51 PM
Load balancing and fault tolerance andreynech Help Center 11 05-31-2005 06:47 PM
Icebox segmantation fault under ice 2.1.0 Nis Baggesen Help Center 3 03-15-2005 12:57 PM


All times are GMT -4. The time now is 11:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.