< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate-users] crash in Resiprocate 1.7


I have never seen a crash at this point, but looking at the code I can come with a theory.

The TuSelector::add method is streaming out the object that is being queued to the TU.  As you can see from the stack trace this is occurring the Stack Thread (since it is a timer).  If you look at the DumTimeout::encode method, it does the following:
   if (mUsageHandle.isValid()) 
   {
      strm << " " << *mUsageHandle;
   }
This is not a safe operation outside of the thread running dum, since the handle may be valid for the if statement, then go away by the time the stream operator is invoked - thus causing a crash.

I'll give this some more thought - but I think we will need to be removing the streaming of the UsageHandle - it's just not safe (outside the DUM thread).  

If this crash is easy to reproduce for you, can you please try commenting out the above code and re-running your test to confirm if this is the issue you are seeing?

Thanks!
Scot

On Mon, Feb 27, 2012 at 2:50 PM, Vasanthi Ramasamy <Vasanthi.Ramasamy@xxxxxxxxxx> wrote:

Hi,

 

We are seeing random crash in one of our application which uses Resiprocate 1.7.  I’m trying to build debug symbols now. Meantime, if anybody has seen this issue, pl. share it with me.

 

(gdb) bt

#0  0xffffe410 in __kernel_vsyscall ()

#1  0x0068adf0 in raise () from /lib/libc.so.6

#2  0x0068c701 in abort () from /lib/libc.so.6

#3  0xf7880570 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6

#4  0xf787df75 in ?? () from /usr/lib/libstdc++.so.6

#5  0xf787dfb2 in std::terminate() () from /usr/lib/libstdc++.so.6

#6  0xf787e6d5 in __cxa_pure_virtual () from /usr/lib/libstdc++.so.6

#7  0xf7e84937 in resip::DumTimeout::encode(std::basic_ostream<char, std::char_traits<char> >&) const ()

   from /opt/vapp/external/VAPPResiprocate/1.7-1/lib/libdum.so

#8  0xf7caaf14 in resip::operator<<(std::basic_ostream<char, std::char_traits<char> >&, resip::Message const&) ()

   from /opt/vapp/external/VAPPResiprocate/1.7-1/lib/libresip.so

#9  0xf7d3fc3d in resip::TuSelector::add(resip::Message*, resip::TimeLimitFifo<resip::Message>::DepthUsage) ()

   from /opt/vapp/external/VAPPResiprocate/1.7-1/lib/libresip.so

#10 0xf7d13759 in resip::BaseTimeLimitTimerQueue::process() () from /opt/vapp/external/VAPPResiprocate/1.7-1/lib/libresip.so

#11 0xf7d07532 in resip::SipStack::process(resip::FdSet&) () from /opt/vapp/external/VAPPResiprocate/1.7-1/lib/libresip.so

#12 0x081b34ca in ?? ()

#13 0x081b8082 in ?? ()

#14 0x0837748b in ?? ()

#15 0x007c2832 in start_thread () from /lib/libpthread.so.0

#16 0x0073446e in clone () from /lib/libc.so.6

 

-Vasanthi


_______________________________________________
resiprocate-users mailing list
resiprocate-users@xxxxxxxxxxxxxxx
List Archive: http://list.resiprocate.org/archive/resiprocate-users/