[jitsi-dev] Ice failures with Jitsi Videobridge


#1

We are getting occasional NPE's from the bridge that causes our video conferences to fail. I'm not sure if we are doing something out of order in our signaling or sending incorrect messages but it seems like the videobridge should handle it better than throwing a null pointer. Any advice on what we are doing wrong would be appreciated.

From the following code

Component component
        = iceStream.getComponent(candidate.getComponent());
String relAddr;
int relPort;
TransportAddress relatedAddress = null;

if (((relAddr = candidate.getRelAddr()) != null)
        && ((relPort = candidate.getRelPort()) != -1))
{
    relatedAddress
            = new TransportAddress(
            relAddr,
            relPort,
            Transport.parse(candidate.getProtocol()));
}

RemoteCandidate relatedCandidate
        = component.findRemoteCandidate(relatedAddress);
RemoteCandidate remoteCandidate
        = new RemoteCandidate(
        new TransportAddress(
                candidate.getIP(),
                candidate.getPort(),
                Transport.parse(
                        candidate.getProtocol())),
        component,
        org.ice4j.ice.CandidateType.parse(
                candidate.getType().toString()),
        candidate.getFoundation(),
        candidate.getPriority(),
        relatedCandidate);

It looks like the component is null here because there was no matching component in the ice stream. What could cause this to happen? It seems like the videobridge should check for this condition and handle it more gracefully.

This is what we see in the videobridge logs.

Stanza that we send to the bridge from the focus controller

<iq to="jitsi-videobridge.inin.com" from="adhoc-fbd0da37-c655-422d-8cad-f47cb5011c92@conference.inin.orgspan.com" id="564b450100001f7340c7fd56" colibriType="transport" type="set"><conference xmlns="http://jitsi.org/protocol/colibri" id="63a3d5108884506d"><content name="video"><channel initiator="true" id="b60ab96f24edea52"><transport xmlns="urn:xmpp:jingle:transports:ice-udp:1" ufrag="Jr5Jy5v12nfsX8AJ" pwd="ETUeblMOfvE9izgSKgGVBg8q"><candidate foundation="2985797220" component="1" protocol="udp" priority="1685987071" ip="168.215.121.226" port="62387" type="srflx" generation="0" rel-addr="172.18.178.57" rel-port="62387" network="1" id="9x.tu36q505z"/></transport></channel></content></conference></iq>

java.lang.NullPointerException

at org.jitsi.videobridge.IceUdpTransportManager.doStartConnectivityEstablishment(IceUdpTransportManager.java:1003)

at org.jitsi.videobridge.IceUdpTransportManager.startConnectivityEstablishment(IceUdpTransportManager.java:1777)

at org.jitsi.videobridge.Channel.setTransport(Channel.java:727)

at org.jitsi.videobridge.Videobridge.handleColibriConferenceIQ(Videobridge.java:886)

at org.jitsi.videobridge.Videobridge.handleColibriConferenceIQ(Videobridge.java:555)

at org.jitsi.videobridge.xmpp.ComponentImpl.handleColibriConferenceIQ(ComponentImpl.java:262)

at org.jitsi.videobridge.xmpp.ComponentImpl.handleIQRequest(ComponentImpl.java:433)

at org.jitsi.videobridge.xmpp.ComponentImpl.handleIQ(ComponentImpl.java:364)

at org.jitsi.videobridge.xmpp.ComponentImpl.handleIQ(ComponentImpl.java:316)

at org.jitsi.videobridge.xmpp.ComponentImpl.handleIQSet(ComponentImpl.java:539)

at org.xmpp.component.AbstractComponent.processIQRequest(AbstractComponent.java:515)

at org.xmpp.component.AbstractComponent.processIQ(AbstractComponent.java:289)

at org.xmpp.component.AbstractComponent.processQueuedPacket(AbstractComponent.java:239)

at org.xmpp.component.AbstractComponent.access$100(AbstractComponent.java:81)

at org.xmpp.component.AbstractComponent$PacketProcessor.run(AbstractComponent.java:1051)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:745)

-- David Ertel
Lead Software Engineer
Core Services


#2

We are getting occasional NPE's from the bridge that causes our video conferences to fail. I'm not sure if we are doing something out of order in our signaling or sending incorrect messages but it seems like the videobridge should handle it better than throwing a null pointer. Any advice on what we are doing wrong would be appreciated.

From the following code

Component component
        = iceStream.getComponent(candidate.getComponent());
String relAddr;
int relPort;
TransportAddress relatedAddress = null;

if (((relAddr = candidate.getRelAddr()) != null)
        && ((relPort = candidate.getRelPort()) != -1))
{
    relatedAddress
            = new TransportAddress(
            relAddr,
            relPort,
            Transport.parse(candidate.getProtocol()));
}

RemoteCandidate relatedCandidate
        = component.findRemoteCandidate(relatedAddress);
RemoteCandidate remoteCandidate
        = new RemoteCandidate(
        new TransportAddress(
                candidate.getIP(),
                candidate.getPort(),
                Transport.parse(
                        candidate.getProtocol())),
        component,
        org.ice4j.ice.CandidateType.parse(
                candidate.getType().toString()),
        candidate.getFoundation(),
        candidate.getPriority(),
        relatedCandidate);

It looks like the component is null here because there was no matching component in the ice stream. What could cause this to happen? It seems like the videobridge should check for this condition and handle it more gracefully.

This is what we see in the videobridge logs.

Stanza that we send to the bridge from the focus controller

<iq to="jitsi-videobridge.inin.com" from="adhoc-fbd0da37-c655-422d-8cad-f47cb5011c92@conference.inin.orgspan.com<mailto:adhoc-fbd0da37-c655-422d-8cad-f47cb5011c92@conference.inin.orgspan.com>" id="564b450100001f7340c7fd56" colibriType="transport" type="set"><conference xmlns="http://jitsi.org/protocol/colibri" id="63a3d5108884506d"><content name="video"><channel initiator="true" id="b60ab96f24edea52"><transport xmlns="urn:xmpp:jingle:transports:ice-udp:1" ufrag="Jr5Jy5v12nfsX8AJ" pwd="ETUeblMOfvE9izgSKgGVBg8q"><candidate foundation="2985797220" component="1" protocol="udp" priority="1685987071" ip="168.215.121.226" port="62387" type="srflx" generation="0" rel-addr="172.18.178.57" rel-port="62387" network="1" id="9x.tu36q505z"/></transport></channel></content></conference></iq>

java.lang.NullPointerException

at org.jitsi.videobridge.IceUdpTransportManager.doStartConnectivityEstablishment(IceUdpTransportManager.java:1003)

at org.jitsi.videobridge.IceUdpTransportManager.startConnectivityEstablishment(IceUdpTransportManager.java:1777)

at org.jitsi.videobridge.Channel.setTransport(Channel.java:727)

at org.jitsi.videobridge.Videobridge.handleColibriConferenceIQ(Videobridge.java:886)

at org.jitsi.videobridge.Videobridge.handleColibriConferenceIQ(Videobridge.java:555)

at org.jitsi.videobridge.xmpp.ComponentImpl.handleColibriConferenceIQ(ComponentImpl.java:262)

at org.jitsi.videobridge.xmpp.ComponentImpl.handleIQRequest(ComponentImpl.java:433)

at org.jitsi.videobridge.xmpp.ComponentImpl.handleIQ(ComponentImpl.java:364)

at org.jitsi.videobridge.xmpp.ComponentImpl.handleIQ(ComponentImpl.java:316)

at org.jitsi.videobridge.xmpp.ComponentImpl.handleIQSet(ComponentImpl.java:539)

at org.xmpp.component.AbstractComponent.processIQRequest(AbstractComponent.java:515)

at org.xmpp.component.AbstractComponent.processIQ(AbstractComponent.java:289)

at org.xmpp.component.AbstractComponent.processQueuedPacket(AbstractComponent.java:239)

at org.xmpp.component.AbstractComponent.access$100(AbstractComponent.java:81)

at org.xmpp.component.AbstractComponent$PacketProcessor.run(AbstractComponent.java:1051)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:745)

-- David Ertel
Lead Software Engineer
Core Services


#3

Hi Ertel,

Thank you for the report.

We are getting occasional NPE’s from the bridge that causes our video
conferences to fail. I’m not sure if we are doing something out of order
in our signaling or sending incorrect messages but it seems like the
videobridge should handle it better than throwing a null pointer. Any
advice on what we are doing wrong would be appreciated.

[...]

It looks like the component is null here because there was no matching
component in the ice stream. What could cause this to happen?

The only plausible scenario that I can think of (given the XML that you sent, with component=1) is that the IceMediaStream's RTP Component got removed here[0]. This could potentially happen if you are sending separate candidates for RTP and RTCP, and the Agent got started with remote candidates for RTCP, but none for RTP.

Do you think that that could be the case with your signalling? Could you provide the full logs (with all COLIBRI messages) so we can check?

It seems
like the videobridge should check for this condition and handle it more
gracefully.

I will add a check, once we find out what the underlying cause is.

Regards,
Boris

[0] https://github.com/jitsi/ice4j/blob/master/src/main/java/org/ice4j/ice/Agent.java#L615

···

On 17/11/15 09:41, Ertel, Dave wrote: