WebRtc2Sip stops working after 500 calls with sipml5 (the call is establish but there are no audio)

354 views
Skip to first unread message

Aimar

unread,
Jul 31, 2013, 2:59:49 PM7/31/13
to doub...@googlegroups.com
Hi

We are using sipml5 + Asterisk + Webrtc2Sip.

and after nearly 500 calls, the system stops working.
in webrtc2sip log we see:

MSG: Failed to get addresses
***ERROR: function: "tnet_get_addresses()"
file: "src/tnet_utils.c"
line: "500"
MSG: getifaddrs failed and errno= [24]
***ERROR: function: "_tnet_ice_ctx_fsm_Started_2_GatheringHostCandidates_X_GatherHostCandidates()"
file: "src/ice/tnet_ice_ctx.c"
line: "838"
MSG: Failed to get addresses
***ERROR: function: "tsip_transport_send_raw_ws()"
file: "src/transports/tsip_transport.c"
line: "374"
MSG: Failed to find peer with local fd equal to 6
***ERROR: function: "tnet_get_addresses()"
file: "src/tnet_utils.c"
line: "500"
MSG: getifaddrs failed and errno= [24]
***ERROR: function: "_tnet_ice_ctx_fsm_Started_2_GatheringHostCandidates_X_GatherHostCandidates()"
file: "src/ice/tnet_ice_ctx.c"
line: "838"
MSG: Failed to get addresses
***ERROR: function: "tnet_transport_mainthread()"
file: "src/tnet_transport_poll.c"
line: "709"
MSG: accept(8) failed
***ERROR: function: "tnet_transport_mainthread()"
file: "src/tnet_transport_poll.c"
line: "709"
MSG: (SYSTEM)NETWORK ERROR ==>Too many open files
***ERROR: function: "tnet_get_addresses()"
file: "src/tnet_utils.c"
line: "500"
MSG: getifaddrs failed and errno= [24]
***ERROR: function: "_tnet_ice_ctx_fsm_Started_2_GatheringHostCandidates_X_GatherHostCandidates()"
file: "src/ice/tnet_ice_ctx.c"
line: "838"

After a careful analysis we observed the following:
After a cycle of a call we lost 2 file descriptors, and when the too many files error happens we have nearly 1000 fd open.

in attach we send the webrtc2sip log of a call cycle ring, answer and disconnect.


webrtc.log

Mamadou

unread,
Aug 1, 2013, 3:30:52 PM8/1/13
to doub...@googlegroups.com, Aimar
*INFO: CloseSocket(fd=17)
*INFO: Socket to remove: fd=12, index=0, tail.count=3
*INFO: Socket to remove: fd=15, index=0, tail.count=2
*INFO: CloseSocket(fd=15)
*INFO: Socket to remove: fd=11, index=0, tail.count=1

The maximum number of TCP connections in webrtc2sip is 64K. Your logs show that the sockets are closed and  tail length decremented.
The there is no logs to signal that ICE sockets are closed but they should. Using netstat I can see that the they are.
An audio call from a browser to PSTN (or any SIP endpoint) will consume 4 sockets (2 RTP and 2RTCP): caller<-rtp->webrtc2sip, caller<-rtcp->webrtc2sip, callee<-rtp->webrtc2sip and callee<-rtcp->webrtc2sip. Add logs in:
https://code.google.com/p/doubango/source/browse/branches/2.0/doubango/tinyNET/src/tnet_socket.c?r=801#258
and https://code.google.com/p/doubango/source/browse/branches/2.0/doubango/tinyNET/src/tnet_utils.c?r=910#1655
to be check that these functions are called 4 times when you terminate the call
--
You received this message because you are subscribed to the Google Groups "discuss-doubango" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
Mamadou DIOP - Technology Evangelist
Doubango Telecom - Paris, France
http://www.doubango.org
Click here to call me!

Aimar

unread,
Aug 2, 2013, 10:16:59 AM8/2/13
to doub...@googlegroups.com
This is repost because i send only to Mamadou by mistake.

I didn't understant your replay.
Do you manage to replicate the bug in your system? Can i had more logs to help debugg the problem?

Bellow the file descriptors behaviors during a call:

 ls -l /proc/`pidof webrtc2sip`/fd

lrwx------ 1 sdf sdf 64 Aug  2 02:31 0 -> /dev/pts/6
lrwx------ 1 sdf sdf 64 Aug  2 02:31 1 -> /dev/pts/6
lrwx------ 1 sdf sdf 64 Aug  2 07:14 10 -> socket:[2622557]
lr-x------ 1 sdf sdf 64 Aug  2 07:14 11 -> /dev/urandom
l-wx------ 1 sdf sdf 64 Aug  2 07:14 17 -> pipe:[2622851]
l-wx------ 1 sdf sdf 64 Aug  2 07:14 19 -> pipe:[2622852]
lrwx------ 1 sdf sdf 64 Aug  2 02:12 2 -> /dev/pts/6
lrwx------ 1 sdf sdf 64 Aug  2 02:31 3 -> socket:[2602163]
lrwx------ 1 sdf sdf 64 Aug  2 02:31 4 -> socket:[2602165]
lr-x------ 1 sdf sdf 64 Aug  2 02:31 5 -> pipe:[2602166]
l-wx------ 1 sdf sdf 64 Aug  2 02:31 6 -> pipe:[2602166]
lr-x------ 1 sdf sdf 64 Aug  2 02:31 7 -> pipe:[2602167]
l-wx------ 1 sdf sdf 64 Aug  2 02:31 8 -> pipe:[2602167]
lrwx------ 1 sdf sdf 64 Aug  2 07:14 9 -> socket:[2622138]

ls -l /proc/`pidof webrtc2sip`/fd | wc -l
15

during Call

ls -l /proc/`pidof webrtc2sip`/fd

lrwx------ 1 sdf sdf 64 Aug  2 02:31 0 -> /dev/pts/6
lrwx------ 1 sdf sdft 64 Aug  2 02:31 1 -> /dev/pts/6
lrwx------ 1sdf sdf 64 Aug  2 07:14 10 -> socket:[2622557]
lr-x------ 1 sdf sdf 64 Aug  2 07:14 11 -> /dev/urandom
lrwx------ 1 sdf sdft 64 Aug  2 07:16 12 -> socket:[2624169]
lrwx------ 1 sdf sdf 64 Aug  2 07:16 13 -> socket:[2624171]
lrwx------ 1sdf sdf 64 Aug  2 07:16 14 -> socket:[2624176]
lrwx------ 1 sdf sdft 64 Aug  2 07:16 15 -> socket:[2624178]
lr-x------ 1 sdf sdf 64 Aug  2 07:16 16 -> pipe:[2624180]
l-wx------ 1 sdf sdf 64 Aug  2 07:14 17 -> pipe:[2622851]
l-wx------ 1sdf sdf 64 Aug  2 07:16 18 -> pipe:[2624180]
l-wx------ 1sdf sdf 64 Aug  2 07:14 19 -> pipe:[2622852]
lrwx------ 1sdf sdf 64 Aug  2 02:12 2 -> /dev/pts/6
lr-x------ 1 sdf sdf 64 Aug  2 07:16 20 -> pipe:[2624181]
l-wx------ 1 sdf sdf 64 Aug  2 07:16 21 -> pipe:[2624181]
lrwx------ 1 sdf sdf 64 Aug  2 02:31 3 -> socket:[2602163]
lrwx------ 1 sdf sdf 64 Aug  2 02:31 4 -> socket:[2602165]
lr-x------ 1 sdf sdf 64 Aug  2 02:31 5 -> pipe:[2602166]
l-wx------ 1 sdf sdf 64 Aug  2 02:31 6 -> pipe:[2602166]
lr-x------ 1 sdf sdf 64 Aug  2 02:31 7 -> pipe:[2602167]
l-wx------ 1 sdf sdf 64 Aug  2 02:31 8 -> pipe:[2602167]
lrwx------ 1 sdf sdf 64 Aug  2 07:14 9 -> socket:[2622138]

>> ls -l /proc/`pidof webrtc2sip`/fd | wc -l
23

end Call
>> ls -l /proc/`pidof webrtc2sip`/fd
total 0
lrwx------ 1 sdf sdf 64 Aug  2 02:31 0 -> /dev/pts/6
lrwx------ 1  sdf sdf 64 Aug  2 02:31 1 -> /dev/pts/6
lrwx------ 1  sdf sdf 64 Aug  2 07:14 10 -> socket:[2622557]
lr-x------ 1  sdf sdf  64 Aug  2 07:14 11 -> /dev/urandom
l-wx------ 1  sdf sdf 64 Aug  2 07:14 17 -> pipe:[2622851]
l-wx------ 1  sdf sdf 64 Aug  2 07:16 18 -> pipe:[2624180]
l-wx------ 1 sdf sdf 64 Aug  2 07:14 19 -> pipe:[2622852]
lrwx------ 1  sdf sdf 64 Aug  2 02:12 2 -> /dev/pts/6
l-wx------ 1  sdf sdf 64 Aug  2 07:16 21 -> pipe:[2624181]
lrwx------ 1  sdf sdf 64 Aug  2 02:31 3 -> socket:[2602163]
lrwx------ 1  sdf sdf t 64 Aug  2 02:31 4 -> socket:[2602165]
lr-x------ 1 sdf sdf 64 Aug  2 02:31 5 -> pipe:[2602166]
l-wx------ 1  sdf sdf t 64 Aug  2 02:31 6 -> pipe:[2602166]
lr-x------ 1 sdf sdf 64 Aug  2 02:31 7 -> pipe:[2602167]
l-wx------ 1  sdf sdf 64 Aug  2 02:31 8 -> pipe:[2602167]
lrwx------ 1 sdf sdf 64 Aug  2 07:14 9 -> socket:[2622138]
>> ls -l /proc/`pidof webrtc2sip`/fd | wc -l
17

from 15 file descriptors it pass to 17.
Reply all
Reply to author
Forward
0 new messages