Hi all, Finally got a change to look at 1.12.9. Had a few little issues with the build. Nothing big, and mostly due to the age of my system.
1. My ancient system does NOT have CLOCK_MONOTONIC, but does have clock_gettime(). Had to manually #undefine HAVE_CLOCK_GETTIME in config.h 2. My system is also missing va_copy(), which is taken care of in many .c files, but su_tagarg.h uses it in the macro for ta_start, but relies on it being supplied by some system include file. Here is the change I copied from one of the C files that had it: diff -n libsofia-sip-ua/su/sofia-sip/su_tagarg.h su_tagarg.h a84 8 #if defined(va_copy) /* Xyzzy */ #elif defined(__va_copy) #define va_copy(dst, src) __va_copy((dst), (src)) #else #define va_copy(dst, src) (memcpy(&(dst), &(src), sizeof (va_list))) #endif So I'm running 1.12.9 and I am seeing a memory leak if the caller hangs up, i.e. sends the BYE. Looks like the handle is not being free'd But, it is no longer on the nua->nua_handles list. I'm not sure where to start looking for the problem. Here is the debug prints for the end of the call: Time 12:17:51: sipuad: nua(0x10b6f4e8): sent signal r_ack Time 12:17:51: sipuad: CH 4 nua_ack( 10B6F4E8 ) Time 12:17:51: sipuad: nua: nua_application_event: entering Time 12:17:51: sipuad: CH 4, Event nua_i_state, status 200, phrase OK Time 12:17:51: sipuad: NUA 10B67890, Context 00000000, Handle 10B6F4E8, Context 300528D8, Ref Cnt 6 Time 12:17:51: sipuad: nua(0x10b6f4e8): recv signal r_ack Time 12:17:51: sipuad: nua: nua_stack_set_params: entering Time 12:17:51: sipuad: nta: selecting scheme sip Time 12:17:51: sipuad: tport_tsend(0x10b691c8) tpn = */10.4.10.2:5060 Time 12:17:51: sipuad: tport_resolve addrinfo = 10.4.10.2:5060 Time 12:17:51: sipuad: tport_by_addrinfo(0x10b691c8): not found by name */10.4.10.2:5060 Time 12:17:51: sipuad: tport_vsend(0x10b691c8): 560 bytes of 560 to */10.4.10.2:5060 Time 12:17:51: sipuad: tport_vsend returned 560 Time 12:17:51: sipuad: nta: sent ACK (100412002) to */10.4.10.2:5060 Time 12:17:51: sipuad: nua(0x10b6f4e8): call state changed: completing -> ready Time 12:17:51: sipuad: nua(0x10b6f4e8): event i_state 200 ACK sent Time 12:17:51: sipuad: nua(0x10b6f4e8): event i_active 200 Call active Time 12:17:51: sipuad: nua: nua_application_event: entering Time 12:17:51: sipuad: CH 4, Event nua_i_state, status 200, phrase ACK sent Time 12:17:51: sipuad: NUA 10B67890, Context 00000000, Handle 10B6F4E8, Context 300528D8, Ref Cnt 6 Time 12:17:51: sipuad: nua: nua_application_event: entering Time 12:17:51: sipuad: CH 4, Event nua_i_active, status 200, phrase Call active Time 12:17:51: sipuad: NUA 10B67890, Context 00000000, Handle 10B6F4E8, Context 300528D8, Ref Cnt 5 Time 12:17:57: sipuad: nua: nua_bye: entering Time 12:17:57: sipuad: nua(0x10b6f4e8): sent signal r_bye Time 12:17:57: sipuad: CH 4 nua_bye( 10B6F4E8 ) Time 12:17:57: sipuad: nua(0x10b6f4e8): recv signal r_bye Time 12:17:57: sipuad: nua: nua_stack_set_params: entering Time 12:17:57: sipuad: nta: selecting scheme sip Time 12:17:57: sipuad: tport_tsend(0x10b691c8) tpn = */10.4.10.2:5060 Time 12:17:57: sipuad: tport_resolve addrinfo = 10.4.10.2:5060 Time 12:17:57: sipuad: tport_by_addrinfo(0x10b691c8): not found by name */10.4.10.2:5060 Time 12:17:57: sipuad: tport_vsend(0x10b691c8): 679 bytes of 679 to */10.4.10.2:5060 Time 12:17:57: sipuad: tport_vsend returned 679 Time 12:17:57: sipuad: nta: sent BYE (100412003) to */10.4.10.2:5060 Time 12:17:57: sipuad: tport_pend(0x10b691c8): pending 0x10b6cf80 for udp/10.1.64.43:5060 (already 0) Time 12:17:57: sipuad: nta: timer shortened to 500 ms Time 12:17:57: sipuad: tport_wakeup_pri(0x10b691c8): events IN Time 12:17:57: sipuad: tport_recv_event(0x10b691c8) Time 12:17:57: sipuad: tport_recv_iovec(0x10b691c8) msg 0x10b7a010 from (udp/10.1.64.43:5060) has 451 bytes, veclen = 1 Time 12:17:57: sipuad: tport_deliver(0x10b691c8): msg 0x10b7a010 (451 bytes) from udp/10.4.10.2:5060/sip next=(nil) Time 12:17:57: sipuad: nta: received 200 OK for BYE (100412003) Time 12:17:57: sipuad: nta: 200 OK is going to a transaction Time 12:17:57: sipuad: nta_outgoing: RTT is 5.58 ms Time 12:17:57: sipuad: tport_release(0x10b691c8): 0x10b6cf80 by 0x10b79ac0 with 0x10b7a010 Time 12:17:57: sipuad: nua(0x10b6f4e8): event r_bye 200 OK Time 12:17:57: sipuad: nua(0x10b6f4e8): call state changed: terminating -> terminated Time 12:17:57: sipuad: nua(0x10b6f4e8): event i_state 200 to BYE Time 12:17:57: sipuad: nua(0x10b6f4e8): event i_terminated 200 to BYE Time 12:17:57: sipuad: nua(0x10b6f4e8): removing session usage Time 12:17:57: sipuad: nta_leg_destroy(0x10a2d1c8) Time 12:17:57: sipuad: nua: terminated session 0x10b6f4e8 Time 12:17:57: sipuad: nua: nua_application_event: entering Time 12:17:57: sipuad: CH 4, Event nua_r_bye, status 200, phrase OK Time 12:17:57: sipuad: NUA 10B67890, Context 00000000, Handle 10B6F4E8, Context 300528D8, Ref Cnt 6 Time 12:17:57: sipuad: nua_handle_destroy( 10B6F4E8 ) Time 12:17:57: sipuad: nua: nua_handle_destroy: entering Time 12:17:57: sipuad: nua(0x10b6f4e8): sent signal r_destroy Time 12:17:57: sipuad: nua: nua_application_event: entering Time 12:17:57: sipuad: nua(0x10b6f4e8): event i_state dropped Time 12:17:57: sipuad: nua: nua_application_event: entering Time 12:17:57: sipuad: nua(0x10b6f4e8): event i_terminated dropped Time 12:17:57: sipuad: nua(0x10b6f4e8): recv signal r_destroy Time 12:17:57: sipuad: nta_leg_destroy((nil)) Time 12:17:58: sipuad: nta: timer set next to 4497 ms Time 12:18:02: sipuad: nta: timer K fired, terminate BYE (100412003) Time 12:18:02: sipuad: outgoing_reclaim_all((nil), (nil), 0x7fffe980) Time 12:18:02: sipuad: nta_outgoing_timer: 0/0 resent, 0/1 tout, 1/3 term, 1/4 free Time 12:18:02: sipuad: nta: timer set next to 18258 ms Time 12:18:20: sipuad: nta: timer D fired, terminate INVITE (100412001) Time 12:18:20: sipuad: outgoing_reclaim_all((nil), (nil), 0x7fffe980) Time 12:18:20: sipuad: nta_outgoing_timer: 0/0 resent, 0/1 tout, 1/2 term, 1/3 free Time 12:18:20: sipuad: nta: timer set next to 2512 ms Time 12:18:23: sipuad: nta: timer D fired, terminate INVITE (100412002) Time 12:18:23: sipuad: nta: timer F fired, terminating ACK (100412002) Time 12:18:23: sipuad: outgoing_reclaim_all((nil), (nil), 0x7fffe980) Time 12:18:23: sipuad: nta_outgoing_timer: 0/0 resent, 1/1 tout, 1/1 term, 2/2 free Time 12:18:23: sipuad: nta: timer not set Here is the SIP trace of the whole call: ================================================================================= 12:17:48.764471 10.1.64.43.5060 > 10.4.10.2.5060: udp 711 [tos 0xb8] INVITE sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 10.1.64.43;rport;branch=z9hG4bK8vUyNpUKHj94Q Max-Forwards: 70 From: "phone 5" <sip:[EMAIL PROTECTED]>;tag=UZZDFH7378B9p To: <sip:[EMAIL PROTECTED]> Call-ID: f0f473b0-c896-122b-1dae-610042a1bffa CSeq: 100412001 INVITE Contact: <sip:[EMAIL PROTECTED];transport=udp> Expires: 180 User-Agent: sofia-sip/1.12.9 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, REFER, UPDATE, NOTIFY, INFO Supported: timer Session-Expires: 180 Min-SE: 120 Content-Type: application/sdp Content-Disposition: session Content-Length: 126 v=0 o=- 8672003755549395828 4520642781370130179 IN IP4 10.1.64.43 s=- c=IN IP4 10.1.64.43 t=0 0 m=audio 13074 RTP/AVP 0 ================================================================================= 12:17:48.766018 10.4.10.2.5060 > 10.1.64.43.5060: udp 487 (DF) [tos 0xa0] SIP/2.0 401 Unauthorized WWW-Authenticate: Digest realm="10.4.10.2",nonce="03d54aa314e6",stale=false,algorithm=MD5,qop="auth" Call-ID: f0f473b0-c896-122b-1dae-610042a1bffa CSeq: 100412001 INVITE From: "phone 5" <sip:[EMAIL PROTECTED]>;tag=UZZDFH7378B9p To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+32c602+459c6ec0 Via: SIP/2.0/UDP 10.1.64.43;received=10.1.64.43;rport=5060;branch=z9hG4bK8vUyNpUKHj94Q Server: DC-SIP/2.0 Organization: Supported: 100rel Content-Length: 0 ================================================================================= 12:17:48.768714 10.1.64.43.5060 > 10.4.10.2.5060: udp 329 [tos 0xb8] ACK sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 10.1.64.43;rport;branch=z9hG4bK8vUyNpUKHj94Q Max-Forwards: 70 From: "phone 5" <sip:[EMAIL PROTECTED]>;tag=UZZDFH7378B9p To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+32c602+459c6ec0 Call-ID: f0f473b0-c896-122b-1dae-610042a1bffa CSeq: 100412001 ACK Content-Length: 0 ================================================================================= 12:17:48.772534 10.1.64.43.5060 > 10.4.10.2.5060: udp 942 [tos 0xb8] INVITE sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 10.1.64.43;rport;branch=z9hG4bK12HSQ4KtDU27S Max-Forwards: 70 From: "phone 5" <sip:[EMAIL PROTECTED]>;tag=UZZDFH7378B9p To: <sip:[EMAIL PROTECTED]> Call-ID: f0f473b0-c896-122b-1dae-610042a1bffa CSeq: 100412002 INVITE Contact: <sip:[EMAIL PROTECTED];transport=udp> Expires: 180 User-Agent: sofia-sip/1.12.9 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, REFER, UPDATE, NOTIFY, INFO Supported: timer Authorization: Digest username="3014243105", realm="10.4.10.2", nonce="03d54aa314e6", cnonce="8PWia8iWEiuuHWEAQqG/+g", algorithm=MD5, uri="sip:[EMAIL PROTECTED]", response="8b6de8386080f70d810c236bdabb6ed4", qop=auth, nc=00000001 Session-Expires: 180 Min-SE: 120 Content-Type: application/sdp Content-Disposition: session Content-Length: 126 v=0 o=- 8672003755549395828 4520642781370130179 IN IP4 10.1.64.43 s=- c=IN IP4 10.1.64.43 t=0 0 m=audio 13074 RTP/AVP 0 ================================================================================= 12:17:48.774045 10.4.10.2.5060 > 10.1.64.43.5060: udp 413 (DF) [tos 0xa0] SIP/2.0 100 Trying Call-ID: f0f473b0-c896-122b-1dae-610042a1bffa CSeq: 100412002 INVITE From: "phone 5" <sip:[EMAIL PROTECTED]>;tag=UZZDFH7378B9p To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+32c702+b9ef0846 Via: SIP/2.0/UDP 10.1.64.43;received=10.1.64.43;rport=5060;branch=z9hG4bK12HSQ4KtDU27S Server: DC-SIP/2.0 Organization: Supported: 100rel Contact: <sip:[EMAIL PROTECTED]> Content-Length: 0 ================================================================================= 12:17:48.783063 10.4.10.2.5060 > 10.1.64.43.5060: udp 414 (DF) [tos 0xa0] SIP/2.0 180 Ringing Call-ID: f0f473b0-c896-122b-1dae-610042a1bffa CSeq: 100412002 INVITE From: "phone 5" <sip:[EMAIL PROTECTED]>;tag=UZZDFH7378B9p To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+32c702+b9ef0846 Via: SIP/2.0/UDP 10.1.64.43;received=10.1.64.43;rport=5060;branch=z9hG4bK12HSQ4KtDU27S Server: DC-SIP/2.0 Organization: Supported: 100rel Contact: <sip:[EMAIL PROTECTED]> Content-Length: 0 ================================================================================= 12:17:51.275526 10.4.10.2.5060 > 10.1.64.43.5060: udp 574 (DF) [tos 0xa0] SIP/2.0 183 Session Progress Call-ID: f0f473b0-c896-122b-1dae-610042a1bffa CSeq: 100412002 INVITE From: "phone 5" <sip:[EMAIL PROTECTED]>;tag=UZZDFH7378B9p To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+32c702+b9ef0846 Via: SIP/2.0/UDP 10.1.64.43;received=10.1.64.43;rport=5060;branch=z9hG4bK12HSQ4KtDU27S Server: DC-SIP/2.0 Organization: Supported: 100rel Contact: <sip:[EMAIL PROTECTED]> Content-Length: 118 Content-Type: application/sdp v=0 o=- 158924004 158924004 IN IP4 10.1.64.41 s=- c=IN IP4 10.1.64.41 t=0 0 m=audio 13058 RTP/AVP 0 a=ptime:10 ================================================================================= 12:17:51.275544 10.4.10.2.5060 > 10.1.64.43.5060: udp 941 (DF) [tos 0xa0] SIP/2.0 200 OK Call-ID: f0f473b0-c896-122b-1dae-610042a1bffa CSeq: 100412002 INVITE From: "phone 5" <sip:[EMAIL PROTECTED]>;tag=UZZDFH7378B9p To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+32c702+b9ef0846 Via: SIP/2.0/UDP 10.1.64.43;received=10.1.64.43;rport=5060;branch=z9hG4bK12HSQ4KtDU27S Server: DC-SIP/2.0 Organization: Allow-Events: message-summary, refer, dialog, line-seize, presence, call-info Supported: 100rel Allow: INVITE, ACK, CANCEL, BYE, REGISTER, OPTIONS, PRACK, UPDATE, SUBSCRIBE, NOTIFY, REFER, INFO Accept-Encoding: identity Accept: application/sdp, application/simple-message-summary, message/sipfrag, application/isup, application/x-simple-call-service-info, multipart/mixed, application/broadsoft Contact: <sip:[EMAIL PROTECTED]> Content-Length: 118 Content-Type: application/sdp v=0 o=- 158924004 158924004 IN IP4 10.1.64.41 s=- c=IN IP4 10.1.64.41 t=0 0 m=audio 13058 RTP/AVP 0 a=ptime:10 ================================================================================= 12:17:51.285868 10.1.64.43.5060 > 10.4.10.2.5060: udp 560 [tos 0xb8] ACK sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 10.1.64.43;rport;branch=z9hG4bKtg8KSjc1acv8B Max-Forwards: 70 From: "phone 5" <sip:[EMAIL PROTECTED]>;tag=UZZDFH7378B9p To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+32c702+b9ef0846 Call-ID: f0f473b0-c896-122b-1dae-610042a1bffa CSeq: 100412002 ACK Authorization: Digest username="3014243105", realm="10.4.10.2", nonce="03d54aa314e6", cnonce="8PWia8iWEiuuHWEAQqG/+g", algorithm=MD5, uri="sip:[EMAIL PROTECTED]", response="8b6de8386080f70d810c236bdabb6ed4", qop=auth, nc=00000001 Content-Length: 0 ================================================================================= 12:17:57.501666 10.1.64.43.5060 > 10.4.10.2.5060: udp 679 [tos 0xb8] BYE sip:[EMAIL PROTECTED] SIP/2.0 Via: SIP/2.0/UDP 10.1.64.43;rport;branch=z9hG4bKmyycB0476mNBe Max-Forwards: 70 From: "phone 5" <sip:[EMAIL PROTECTED]>;tag=UZZDFH7378B9p To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+32c702+b9ef0846 Call-ID: f0f473b0-c896-122b-1dae-610042a1bffa CSeq: 100412003 BYE User-Agent: sofia-sip/1.12.9 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, REFER, UPDATE, NOTIFY, INFO Supported: timer Authorization: Digest username="3014243105", realm="10.4.10.2", nonce="03d54aa314e6", cnonce="8PWia8iWEiuuHWEAQqG/+g", algorithm=MD5, uri="sip:[EMAIL PROTECTED]", response="84edb88b48360be21661ed0a8086bb82", qop=auth, nc=00000002 Content-Length: 0 ================================================================================= 12:17:57.503144 10.4.10.2.5060 > 10.1.64.43.5060: udp 451 (DF) [tos 0xa0] SIP/2.0 200 OK Call-ID: f0f473b0-c896-122b-1dae-610042a1bffa CSeq: 100412003 BYE From: "phone 5" <sip:[EMAIL PROTECTED]>;tag=UZZDFH7378B9p To: <sip:[EMAIL PROTECTED]>;tag=metaswitch+1+32c702+b9ef0846 Via: SIP/2.0/UDP 10.1.64.43;received=10.1.64.43;rport=5060;branch=z9hG4bKmyycB0476mNBe Server: DC-SIP/2.0 Organization: Allow-Events: message-summary, refer, dialog, line-seize, presence, call-info Supported: 100rel Content-Length: 0 ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel