Thanks Pekka,
That fixed the main handle memory leak.

Another memory issue I've found is when receiving the un-SUBSCRIBEd NOTIFY feature you just added.
I receive the NOTIFY, respond 200 OK, and destroy the handle, but 8 memory blocks do not get freed.
Here are the nua and nta debug output:
Time 19:15:18: sipuad: nta: received NOTIFY sip:[EMAIL PROTECTED];transport=udp SIP/2.0 (CSeq 102)
Time 19:15:18: sipuad: nta: canonizing sip:[EMAIL PROTECTED] with contact
Time 19:15:18: sipuad: nta: NOTIFY (102) going to a default leg
Time 19:15:18: sipuad: nua: nua_stack_process_request: entering
Time 19:15:18: sipuad: nua: nh_create: entering
Time 19:15:18: sipuad: nua: nh_create_handle: entering
Time 19:15:18: sipuad: nua: nua_stack_set_params: entering
Time 19:15:18: sipuad: nta_leg_create(0x10b5d300)
Time 19:15:18: sipuad: nua(0x10b6bbf8): event i_notify 100 Trying
Time 19:15:18: sipuad: nua: nua_event: entering
Time 19:15:18: sipuad: nua: nua_handle_bind: entering
Time 19:15:18: sipuad: CH 8 nua_handle_bind( 10B6BBF8 )
Time 19:15:18: sipuad: CH 8 nua_set_hparams( 10B6BBF8 )
Time 19:15:18: sipuad: nua: nua_set_hparams: entering
Time 19:15:18: sipuad: nua(0x10b6bbf8): signal r_set_params
Time 19:15:18: sipuad: CH 8 nua_respond( 10B6BBF8, 200 OK )
Time 19:15:18: sipuad: nua: nua_respond: entering
Time 19:15:18: sipuad: nua(0x10b6bbf8): signal r_respond
Time 19:15:18: sipuad: CH 8 nua_handle_destroy( 10B6BBF8 )
Time 19:15:18: sipuad: nua: nua_handle_destroy: entering
Time 19:15:18: sipuad: nua(0x10b6bbf8): signal r_destroy
Time 19:15:18: sipuad: nua(0x10b6bbf8): recv r_set_params
Time 19:15:18: sipuad: nua(0x10b6bbf8): signal r_set_params
Time 19:15:18: sipuad: nua: nua_stack_set_params: entering
Time 19:15:18: sipuad: nua(0x10b6bbf8): event r_set_params 200 OK
Time 19:15:18: sipuad: nua(0x10b6bbf8): recv r_respond
Time 19:15:18: sipuad: nua(0x10b6bbf8): signal r_respond 200 OK
Time 19:15:18: sipuad: nua: nua_stack_set_params: entering
Time 19:15:18: sipuad: nta: sent 200 OK for NOTIFY (102)
Time 19:15:18: sipuad: nta: timer set to 32000 ms
Time 19:15:18: sipuad: nua(0x10b6bbf8): recv r_destroy
Time 19:15:18: sipuad: nua(0x10b6bbf8): signal r_destroy
Time 19:15:18: sipuad: nta: timer set next to 31997 ms

Here are the back traces to each block mallocd but not freed. (In reverse time order)

Size: 104
 (sub_alloc+740)
 (su_alloc+0x64)
 (msg_header_alloc+0x28)
 (msg_header_dup_as+0xd8)
 (leg_route+356)
 (nta_leg_server_route+0x18)
 (nua_dialog_uas_route+0x6c)
 (nua_stack_process_request+0x7b0)
 (incoming_callback+256)
 (leg_recv+376)
 (agent_recv_request+3320)
 (agent_recv_message+152)
 (tport_base_deliver+0x44)
 (tport_deliver+0x358)
 (tport_parse+448)
 (tport_recv_event+0x1d0)
 (tport_base_wakeup+108)
 (tport_wakeup_pri+324)
 (su_poll_port_wait_events+216)
 (su_base_port_step+0x114)
 (su_root_step+0x68)
Size: 32
 (sub_alloc+740)
 (su_alloc+0x64)
 (msg_header_find_param+0x298)
 (msg_header_replace_param+0x18)
 (sip_addr_d+0x51c)
 (sip_to_tag+0x10)
 (nta_leg_tag+0xc4)
 (nua_stack_incoming_handle+0x21c)
 (nua_stack_process_request+0x71c)
 (incoming_callback+256)
 (leg_recv+376)
 (agent_recv_request+3320)
 (agent_recv_message+152)
 (tport_base_deliver+0x44)
 (tport_deliver+0x358)
 (tport_parse+448)
 (tport_recv_event+0x1d0)
 (tport_base_wakeup+108)
 (tport_wakeup_pri+324)
 (su_poll_port_wait_events+216)
 (su_base_port_step+0x114)
Size: 18
 (sub_alloc+740)
 (su_alloc+0x64)
 (su_strdup+0x3c)
 (su_vsprintf+0x7c)
 (su_sprintf+0x84)
 (sip_addr_d+0x4f0)
 (sip_to_tag+0x10)
 (nta_leg_tag+0xc4)
 (nua_stack_incoming_handle+0x21c)
 (nua_stack_process_request+0x71c)
 (incoming_callback+256)
 (leg_recv+376)
 (agent_recv_request+3320)
 (agent_recv_message+152)
 (tport_base_deliver+0x44)
 (tport_deliver+0x358)
 (tport_parse+448)
 (tport_recv_event+0x1d0)
 (tport_base_wakeup+108)
 (tport_wakeup_pri+324)
 (su_poll_port_wait_events+216)
Size: 76
 (sub_alloc+740)
 (su_alloc+0x64)
 (msg_header_alloc+0x28)
 (msg_header_dup_as+0xd8)
 (nta_leg_tcreate+0x874)
 (nua_stack_incoming_handle+0x1f8)
 (nua_stack_process_request+0x71c)
 (incoming_callback+256)
 (leg_recv+376)
 (agent_recv_request+3320)
 (agent_recv_message+152)
 (tport_base_deliver+0x44)
 (tport_deliver+0x358)
 (tport_parse+448)
 (tport_recv_event+0x1d0)
 (tport_base_wakeup+108)
 (tport_wakeup_pri+324)
 (su_poll_port_wait_events+216)
 (su_base_port_step+0x114)
 (su_root_step+0x68)
Size: 158
 (sub_alloc+740)
 (su_alloc+0x64)
 (msg_header_alloc+0x28)
 (msg_header_dup_as+0xd8)
 (nta_leg_tcreate+0x410)
 (nua_stack_incoming_handle+0x1f8)
 (nua_stack_process_request+0x71c)
 (incoming_callback+256)
 (leg_recv+376)
 (agent_recv_request+3320)
 (agent_recv_message+152)
 (tport_base_deliver+0x44)
 (tport_deliver+0x358)
 (tport_parse+448)
 (tport_recv_event+0x1d0)
 (tport_base_wakeup+108)
 (tport_wakeup_pri+324)
 (su_poll_port_wait_events+216)
 (su_base_port_step+0x114)
 (su_root_step+0x68)
Size: 118
 (sub_alloc+740)
 (su_alloc+0x64)
 (msg_header_alloc+0x28)
 (msg_header_dup_as+0xd8)
 (nta_leg_tcreate+0x390)
 (nua_stack_incoming_handle+0x1f8)
 (nua_stack_process_request+0x71c)
 (incoming_callback+256)
 (leg_recv+376)
 (agent_recv_request+3320)
 (agent_recv_message+152)
 (tport_base_deliver+0x44)
 (tport_deliver+0x358)
 (tport_parse+448)
 (tport_recv_event+0x1d0)
 (tport_base_wakeup+108)
 (tport_wakeup_pri+324)
 (su_poll_port_wait_events+216)
 (su_base_port_step+0x114)
 (su_root_step+0x68)
Size: 284
 (su_strerror+0x35c)
 (su_home_clone+0xa8)
 (nta_leg_tcreate+0x334)
 (nua_stack_incoming_handle+0x1f8)
 (nua_stack_process_request+0x71c)
 (incoming_callback+256)
 (leg_recv+376)
 (agent_recv_request+3320)
 (agent_recv_message+152)
 (tport_base_deliver+0x44)
 (tport_deliver+0x358)
 (tport_parse+448)
 (tport_recv_event+0x1d0)
 (tport_base_wakeup+108)
 (tport_wakeup_pri+324)
 (su_poll_port_wait_events+216)
 (su_base_port_step+0x114)
 (su_root_step+0x68)
Size: 68
 (su_strerror+0x2fc)
 (su_home_clone+0xa8)
 (nta_leg_tcreate+0x334)
 (nua_stack_incoming_handle+0x1f8)
 (nua_stack_process_request+0x71c)
 (incoming_callback+256)
 (leg_recv+376)
 (agent_recv_request+3320)
 (agent_recv_message+152)
 (tport_base_deliver+0x44)
 (tport_deliver+0x358)
 (tport_parse+448)
 (tport_recv_event+0x1d0)
 (tport_base_wakeup+108)
 (tport_wakeup_pri+324)
 (su_poll_port_wait_events+216)
 (su_base_port_step+0x114)
 (su_root_step+0x68)


Pekka Pessi wrote:
On 2/6/07, Colin Whittaker <[EMAIL PROTECTED]> wrote:
  
Maybe something changed in reference counting...
    

Yep, there was a #if 0 around code destroying application reference.
Looks like there was a problem in responding with error response to an
initial request. I pushed a fix to darcs, thanks for pointing this
out..

  
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to