100% CPU usage after releasing an audio call to TCP turn server
I am using janus 0.6.3 with the sip plugin and make a call from a PBX deskphone to my web client. This call does thru a turn server in TCP mode. When janus is ending the call the CPU usage bombs to 100%.
When I use the turn server in UDP mode I can not reproduce such issue, it looks so linked to TCP.
In janus it is a thread of the libnice-0.1.15 that takes 100% of CPU :
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 5949 janus 16 -4 1358180 22500 17484 R 99.9 1.1 0:07.62 hloop 809415252
A "sudo strace -p 5949" gives a lot of call to "poll" function :
... poll([{fd=102, events=POLLIN}, {fd=113, events=POLLIN}, {fd=114, events=POLLIN}], 3, 14992) = 1 ([{fd=114, revents=POLLIN}]) poll([{fd=102, events=POLLIN}, {fd=113, events=POLLIN}, {fd=114, events=POLLIN}], 3, 14991) = 1 ([{fd=114, revents=POLLIN}]) poll([{fd=102, events=POLLIN}, {fd=113, events=POLLIN}, {fd=114, events=POLLIN}], 3, 14991) = 1 ([{fd=114, revents=POLLIN}]) poll([{fd=102, events=POLLIN}, {fd=113, events=POLLIN}, {fd=114, events=POLLIN}], 3, 14991) = 1 ([{fd=114, revents=POLLIN}]) poll([{fd=102, events=POLLIN}, {fd=113, events=POLLIN}, {fd=114, events=POLLIN}], 3, 14991) = 1 ([{fd=114, revents=POLLIN}]) ...