Let me elaborate a little more on my previous e-mail, maybe someone can help me in a different way...
As you can see from my previous messages to the list, I'm having problems with SIGSEGVs in my application... I'm trying to reproduce the problem under valgrind, but as it only happens under heavy load, the performance hit introduced by valgrind is changing the outcome, but I'm still trying... In the meantime, I analyzed my code and sofia's source and I believe the problem lies in the way I use nua_saved_event_t... My application interacts with other applications and must wait for answers from these applications before it can send a response to the request... So, for each call, I keep a stack of pointers to nua_saved_event_ts around, so I can use the last saved event in nua_respond() when the whole processing chain is complete... In the destructor of my 'call' class if pop the remaining elements (if any) from the stack and call nua_destroy_event() on them... If all goes well with the call there should be no event left unanswered int the stack when it's destructed, but when things start to escalate and thousands of calls are simultaneously active, the other applications can kill the call, for example, and then the stack would be populated when the call is destructed... If I understand correctly, nua_save_event() doesn't do a deep copy of the message being saved... So in practice my application and sofia are sharing different pointers to the same memory locations, and I believe those error conditions lead to some situation in which I call nua_destroy_event() and then the stack for some other reason tries to deallocate some portion of the same memory area again (or vice-versa). Maybe I'm way off here, does that make any sense? So what I was trying to do is get rid of those shared pointers, and thought of keeping pointers for msg_t (obtained via msg_dup()) instead of nua_saved_event_t, thus using NUTAG_WITH() in nua_respond instead of NUTAG_WITH_SAVED(), but that didn't seem to work out very well... I'm feeling a bit lost right now.. I don't know if I should change my application's design, or how... nua_handle_destroy() doesn't free all the saved events by any chance, does it? Any help will be much appreciated. Thanks in advance. On Wed, Feb 27, 2008 at 3:49 PM, Fabio Margarido <[EMAIL PROTECTED]> wrote: > Hi there, > > is it okay if I use NUTAG_WITH() passing a deep copy of the msg_t > request (obtained with msg_dup) instead of the original msg_t > structure? This is apparently not working for me... > Thanks. > > Fabio > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel