Looking at the handle that memory for the handle that was destroyed, it 
appears the ref count is active, but the handle is no longer on the 
nua->nua_handles list.
Here is a listing of the handle's parameters:
(gdb) p *(nua_handle_t *)0x10b5abb8
$1 = {nh_home = {{suh_size = 140, suh_blocks = 0x10b5ae38, suh_lock = 
0x10b5acc8}}, nh_next = 0x0, nh_prev = 0x0,
  nh_nua = 0x10b58170, nh_valid = 0x0, nh_magic = 0x3002b008, nh_tags = 
0x10b5ac48, nh_ptags = 0x0, nh_identity = 0x0,
  nh_prefs = 0x10b5b260, nh_special = nua_i_error, nh_has_invite = 0, 
nh_has_subscribe = 0, nh_has_notify = 0,
  nh_has_register = 0, nh_active_call = 0, nh_hold_remote = 0, 
nh_ref_by_stack = 1, nh_ref_by_user = 1, nh_init = 1,
  nh_used_ptags = 1, 0, nh_ds = {{ds_usage = 0x0, ds_cr = 0x0, ds_sr = 
0x0, ds_route = 0, ds_terminated = 0, ds_has_session = 0,
      ds_has_register = 0, ds_has_publish = 0, ds_got_referrals = 0, 0, 
ds_has_events = 0, ds_has_subscribes = 0,
      ds_has_notifys = 0, ds_local = 0x10b5ac58, ds_remote = 0x10b5ccb0, 
ds_leg = 0x0, ds_remote_tag = 0x0, ds_remote_ua = {{
          nr_allow = 0x0, nr_accept = 0x0, nr_require = 0x0, 
nr_supported = 0x0, nr_user_agent = 0x10b5f600}}}},
  nh_auth = 0x10b5dba8, nh_soa = 0x0, nh_referral = {{ref_handle = 0x0, 
ref_event = 0x0}}, nh_notifier = 0x0}

Maybe something changed in reference counting...
Here is the nua agent parameters:
(gdb) p *(nua_t *) 0x10b58170
$2 = {nua_home = {{suh_size = 188, suh_blocks = 0x10b58b20, suh_lock = 
0x10b58230}}, nua_api_root = 0x10b57eb0, nua_clone = {
    0x10b58c80}, nua_client = {{sut_port = 0x10b580e8, sut_root = 
0x10b57eb0}}, nua_nw_changed = 0x0,
  nua_callback = 0x10035764 <sipcb>, nua_magic = 0x0, nua_current = 
{0x0}, nua_signal = {0x0}, nua_shutdown_started = 0,
  nua_shutdown_final = 0, 280333376, nua_args = 0x10b58c40, nua_from = 
{{a_common = {{h_succ = 0x0, h_prev = 0x0,
          h_class = 0x101258f8, h_data = 0x0, h_len = 0}}, a_next = 0x0, 
a_display = 0x10b5aac8 "", a_url = {{url_pad = "\000",
          url_type = 1 '\001', url_root = 0 '\000', url_scheme = 
0x101338b4 "sip", url_user = 0x0, url_password = 0x0,
          url_host = 0x10b5aac9 "10.1.64.123", url_port = 0x0, url_path 
= 0x0, url_params = 0x10b5aad5 "transport=udp",
          url_headers = 0x0, url_fragment = 0x0}}, a_params = 0x0, 
a_comment = 0x0, a_tag = 0x0}}, nua_registrations = 0x10b5a620,
  nua_invite_accept = 0x10b592e0, nua_root = 0x10a1fb98, nua_server = 
{{sut_port = 0x10b580e8, sut_root = 0x10a1fb98}},
  nua_nta = 0x10b59348, nua_timer = 0x10b58ca8, nua_sip_parser = 0x0, 
nua_shutdown = 0, nua_service_route = 0x0,
  nua_media_enable = 0, 280333544, nua_handles = 0x10b58ce8, 
nua_handles_tail = 0x10b58cf4}

I hope this helps.

Colin..

Colin Whittaker wrote:
> I would hold off on 1.12.5 for now.
>
> It appears some handle memory is not allocated from the handle su_home, 
> but from the nua agent's su_home. This appears as a leak since the agent 
> never free's these items when the handle is destroyed. However, they are 
> freed when the nua agent is destroyed, but that never happens in an up 
> and running system.
>
> Here are a bunch back traces for the memory allocation where the memory 
> is not freed when the handle is destroyed.
> This system had multiple handles, all of which were destroyed and are no 
> longer on the nua->nua_handles list.
>
> On a normal REGISTER I had 20 memory blocks that were not freed when the 
> handle was destroyed.
> nua_handle()
> nua_set_hparams() with NUTAG_M_USERNAME(), NUTAG_AUTOACK( 1 ),  
> SIPTAG_FROM_STR(), NUTAG_EARLY_ANSWER( 0 ),      SOATAG_USER_SDP_STR()
> nua_register() with NUTAG_REGISTRAR(),SIPTAG_TO_STR(), 
> SIPTAG_FROM_STR(),SIPTAG_CSEQ_STR(), SOATAG_USER_SDP_STR(), 
> SIPTAG_EXPIRES_STR()
> 401 Unauthorized received
> nua_authenticate()
> 200 OK received
>
> 1. Size 140
>  (sub_alloc+728)
>  (su_home_clone+0xa8)
>  (nh_create_handle+0xb8)
>  (nua_handle+0x1a0)
> 2. Size 284
>  (sub_alloc+824)
>  (su_home_clone+0xa8)
>  (nh_create_handle+0xb8)
>  (nua_handle+0x1a0)
> 3. Size 123
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (tl_afilter+0x74)
>  (tl_filtered_tlist+0x190)
>  (nua_handle_save_tags+0x338)
>  (nh_create_handle+0xe8)
>  (nua_handle+0x1a0)
> 4. Size 48
>  (su_home_threadsafe+0xa4)
>  (nh_create_handle+0x174)
>  (nua_handle+0x1a0)
> 5. Size 11
> (sub_alloc+740)
>  (su_alloc+0x64)
>  (su_strdup+0x3c)
>  (nhp_set_tags+2804)
>  (nua_stack_set_params+0x1e4)
>  (nua_stack_signal+0x2b4)
>  (su_base_port_execute_msgs+120)
>  (su_base_port_getmsgs+0x90)
>  (su_base_port_step+0xc8)
>  (su_root_step+0x68)
> 6. Size 116
>  (sub_alloc+728)
>  (su_zalloc+0x80)
>  (nhp_move_params+60)
>  (nua_stack_set_params+0x2a8)
>  (nua_stack_signal+0x2b4)
>  (su_base_port_getmsgs_from+0x290)
>  (su_base_port_getmsgs+0x90)
>  (su_base_port_step+0xc8)
>  (su_root_step+0x68)
> 7. Size 220
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (tl_adup+0x64)
>  (tl_tlist+0x188)
>  (nua_client_create+0x17c)
>  (nua_stack_register+0x34)
>  (nua_stack_signal+0x2d8)
>  (su_base_port_execute_msgs+120)
>  (su_base_port_getmsgs+0x90)
>  (su_base_port_step+0xc8)
>  (su_root_step+0x68)
> 8. Size 19
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (url_as_string+0x48)
>  (nhp_set_tags+2488)
>  (nua_stack_set_params+0x1e4)
>  (nua_stack_init_handle+0x1cc)
>  (nua_client_init_request+0xd4)
>  (nua_client_create+0x19c)
>  (nua_stack_register+0x34)
>  (nua_stack_signal+0x2d8)
>  (su_base_port_execute_msgs+120)
>  (su_base_port_getmsgs+0x90)
>  (su_base_port_step+0xc8)
>  (su_root_step+0x68)
> 9. Size 127
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (msg_header_alloc+0x28)
>  (msg_header_make+0x1dc)
>  (nua_handle_contact_by_via+0x55c)
>  (nua_registration_set_contact+0x100)
>  (nua_register_client_init+336)
>  (nua_client_init_request+0x520)
>  (nua_client_create+0x19c)
>  (nua_stack_register+0x34)
>  (nua_stack_signal+0x2d8)
>  (su_base_port_execute_msgs+120)
>  (su_base_port_getmsgs+0x90)
>  (su_base_port_step+0xc8)
>  (su_root_step+0x68)
> 10. Size 111
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (msg_header_alloc+0x28)
>  (msg_header_dup_as+0xd8)
>  (nua_client_request_sendmsg+264)
>  (nua_client_request_try+144)
>  (nua_client_init_request+0x550)
>  (nua_client_create+0x19c)
>  (nua_stack_register+0x34)
>  (nua_stack_signal+0x2d8)
>  (su_base_port_execute_msgs+120)
>  (su_base_port_getmsgs+0x90)
>  (su_base_port_step+0xc8)
>  (su_root_step+0x68)
> 11. Size 92
>  (sub_alloc+728)
>  (su_home_clone+0xa8)
>  (ca_create+248)
>  (auc_challenge+0x118)
>  (nh_challenge+92)
>  (nua_base_client_check_restart+0x1f8)
>  (nua_register_client_check_restart+200)
>  (nua_client_check_restart+0xe0)
>  (nua_client_response+0x70)
>  (nua_client_orq_response+0x68)
>  (outgoing_recv+1568)
>  (agent_recv_response+1004)
>  (agent_recv_message+196)
>  (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)
> 12. Size 284
>  (sub_alloc+824)
>  (su_home_clone+0xa8)
>  (ca_create+248)
>  (auc_challenge+0x118)
>  (nh_challenge+92)
>  (nua_base_client_check_restart+0x1f8)
>  (nua_register_client_check_restart+200)
>  (nua_client_check_restart+0xe0)
>  (nua_client_response+0x70)
>  (nua_client_orq_response+0x68)
>  (outgoing_recv+1568)
>  (agent_recv_response+1004)
>  (agent_recv_message+196)
>  (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)
> 13. Size 10:
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (su_strndup+0x2c)
>  (msg_unquote_dup+0xc4)
>  (auth_get_params+0x280)
>  (auth_digest_challenge_get+0x190)
>  (auc_digest_challenge+140)
>  (ca_challenge+276)
>  (auc_challenge+0x130)
>  (nh_challenge+92)
>  (nua_base_client_check_restart+0x1f8)
>  (nua_register_client_check_restart+200)
>  (nua_client_check_restart+0xe0)
>  (nua_client_response+0x70)
>  (nua_client_orq_response+0x68)
>  (outgoing_recv+1568)
>  (agent_recv_response+1004)
>  (agent_recv_message+196)
>  (tport_base_deliver+0x44)
>  (tport_deliver+0x358)
>  (tport_parse+448)
> 14. Size 13:
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (su_strndup+0x2c)
>  (msg_unquote_dup+0xc4)
>  (auth_get_params+0x280)
>  (auth_digest_challenge_get+0x190)
>  (auc_digest_challenge+140)
>  (ca_challenge+276)
>  (auc_challenge+0x130)
>  (nh_challenge+92)
>  (nua_base_client_check_restart+0x1f8)
>  (nua_register_client_check_restart+200)
>  (nua_client_check_restart+0xe0)
>  (nua_client_response+0x70)
>  (nua_client_orq_response+0x68)
>  (outgoing_recv+1568)
>  (agent_recv_response+1004)
>  (agent_recv_message+196)
>  (tport_base_deliver+0x44)
>  (tport_deliver+0x358)
>  (tport_parse+448)
> 15 Size 4
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (su_strdup+0x3c)
>  (auth_get_params+0x290)
>  (auth_digest_challenge_get+0x190)
>  (auc_digest_challenge+140)
>  (ca_challenge+276)
>  (auc_challenge+0x130)
>  (nh_challenge+92)
>  (nua_base_client_check_restart+0x1f8)
>  (nua_register_client_check_restart+200)
>  (nua_client_check_restart+0xe0)
>  (nua_client_response+0x70)
>  (nua_client_orq_response+0x68)
>  (outgoing_recv+1568)
>  (agent_recv_response+1004)
>  (agent_recv_message+196)
>  (tport_base_deliver+0x44)
>  (tport_deliver+0x358)
>  (tport_parse+448)
>  (tport_recv_event+0x1d0)
> 16. Size 5
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (su_strndup+0x2c)
>  (msg_unquote_dup+0xc4)
>  (auth_get_params+0x280)
>  (auth_digest_challenge_get+0x190)
>  (auc_digest_challenge+140)
>  (ca_challenge+276)
>  (auc_challenge+0x130)
>  (nh_challenge+92)
>  (nua_base_client_check_restart+0x1f8)
>  (nua_register_client_check_restart+200)
>  (nua_client_check_restart+0xe0)
>  (nua_client_response+0x70)
>  (nua_client_orq_response+0x68)
>  (outgoing_recv+1568)
>  (agent_recv_response+1004)
>  (agent_recv_message+196)
>  (tport_base_deliver+0x44)
>  (tport_deliver+0x358)
>  (tport_parse+448)
> 17 Size 25:
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (auc_digest_challenge+332)
>  (ca_challenge+276)
>  (auc_challenge+0x130)
>  (nh_challenge+92)
>  (nua_base_client_check_restart+0x1f8)
>  (nua_register_client_check_restart+200)
>  (nua_client_check_restart+0xe0)
>  (nua_client_response+0x70)
>  (nua_client_orq_response+0x68)
>  (outgoing_recv+1568)
>  (agent_recv_response+1004)
>  (agent_recv_message+196)
>  (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)
> 18. Size 11:
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (su_strdup+0x3c)
>  (ca_credentials+180)
>  (auc_credentials+0x150)
>  (nh_authorize+440)
>  (nua_stack_authenticate+0x54)
>  (nua_stack_signal+0x470)
>  (su_base_port_execute_msgs+120)
>  (su_base_port_getmsgs+0x90)
>  (su_base_port_step+0xc8)
>  (su_root_step+0x68)
> 19. Size 9:
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (su_strdup+0x3c)
>  (ca_credentials+196)
>  (auc_credentials+0x150)
>  (nh_authorize+440)
>  (nua_stack_authenticate+0x54)
>  (nua_stack_signal+0x470)
>  (su_base_port_execute_msgs+120)
>  (su_base_port_getmsgs+0x90)
>  (su_base_port_step+0xc8)
>  (su_root_step+0x68)
> 20. Size 39:
>  (sub_alloc+740)
>  (su_alloc+0x64)
>  (msg_header_alloc+0x28)
>  (msg_header_dup_as+0xd8)
>  (nua_dialog_store_peer_info+0x1e4)
>  (nua_client_response+0xd4)
>  (nua_client_orq_response+0x68)
>  (outgoing_recv+1568)
>  (agent_recv_response+1004)
>  (agent_recv_message+196)
>  (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)
>
>
>
>
>
> -------------------------------------------------------------------------
> 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
>   

-------------------------------------------------------------------------
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