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

RE: [reSIProcate] free( ): Invalid pointer 0xxxxxxxx


Title: Message
Asheesh
 
The problem you listed below, as well as the earlier crash in the SipMessage dtor, are symptoms of your application corrupting the heap.  I know this because that is what my application was doing.  This is most likely occurring in some load-initiated error handling scenario.  I can only tell you to try and find the problem under valgrind.  I know it really slows things down, but in running slower you may be able to simulate the overloaded situation.  Perhaps even instrument some code to force retries/packet loss/etc? 
 
It took me nearly 2 solid weeks to completely rid my code of these issues.  As an example, there was one problem in which I was writing to an object that contained a UDP packet just after sending the packet.  Under loading the writing thread would block in the sendto syscall.  While it was blocked, the UDP response packet was received on a different thread and the original sent object was released in that thread.  When the sending thread finally got scheduled again, the write to the object was after it was back on the heap (and possibly allocated again).  These types of problems are very hard to find, but they will occur when you have >30000 context switches per second as you might with RTP processing and very high call setup rates.
 
Good luck. 
Dennis
 
-----Original Message-----
From: Asheesh Joshi [mailto:asjoshi@xxxxxxxxxx]
Sent: Thursday, October 06, 2005 2:53 AM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: [reSIProcate] free( ): Invalid pointer 0xxxxxxxx

Hi,

 

 Can anyone help me as to when one would get such an error ?

 

Free( ) : Invalid pointer: 0xxxxxxxxx

 

Is it compiler dependent ? While running my Resip-B2BUA, the logs

showed up such an error after 50,000 calls. I have never seen this thing before.

 

Thanks in advance

Asheesh.