[libnice] libnice leaking TCP servers? (ICE-TCP)

Lorenzo Miniero lminiero at gmail.com
Fri Nov 20 07:16:55 PST 2015


Hi,

apparently when libnice is configured to gather TCP candidates the TCP
servers allocated for the purpose are never closed. If I enable ICE-TCP
support in Janus (https://github.com/meetecho/janus-gateway/), when I
create a session I can see the TCP servers listening, but they never go
away even after the agent has been destroyed.

To reproduce, just launch Janus, verify it's currently only listening on
the signalling ports:

sudo netstat -tulpn | grep janus | grep tcp
tcp        0      0 0.0.0.0:8188            0.0.0.0:*
LISTEN      14451/./janus
tcp        0      0 0.0.0.0:7088            0.0.0.0:*
LISTEN      14451/./janus
tcp        0      0 0.0.0.0:8088            0.0.0.0:*
LISTEN      14451/./janus


Start the echo test, which will gather a TCP candidate as well (just one
because the echotest answers, and so knows bundle+rtcpmux are supported;
four servers are leaked instead when it's Janus offering, as you have
RTP+RTCP audio and RTP+RTCP video):

sudo netstat -tulpn | grep janus | grep tcp
tcp        0      0 0.0.0.0:8188            0.0.0.0:*
LISTEN      14451/./janus
tcp        0      0 0.0.0.0:7088            0.0.0.0:*
LISTEN      14451/./janus
tcp        0      0 192.168.0.12:33523      0.0.0.0:*
LISTEN      14451/./janus
tcp        0      0 0.0.0.0:8088            0.0.0.0:*
LISTEN      14451/./janus


Close the echotest demo, wait for the WebRTC resources to be freed in
Janus, and check again to see the server is still there listening, despite
the fact the agent (and so all of its streams and components) is gone:

sudo netstat -tulpn | grep janus | grep tcp
tcp        0      0 0.0.0.0:8188            0.0.0.0:*
LISTEN      14451/./janus
tcp        0      0 0.0.0.0:7088            0.0.0.0:*
LISTEN      14451/./janus
tcp        0      0 192.168.0.12:33523      0.0.0.0:*
LISTEN      14451/./janus
tcp        0      0 0.0.0.0:8088            0.0.0.0:*
LISTEN      14451/./janus


What could be the cause? Any further info I can provide to debug this?

This is definitely happening to me on my Fedora 22 (libnice 0.1.13 from
repo), but it's happening to some other users as well (not sure about the
libnice version there, but definitely one with ICE-TCP support).

Thanks,
Lorenzo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20151120/3d4d7219/attachment.html>


More information about the nice mailing list