[jitsi-dev] [jitsi-videobridge] fix: Patch Conference 500 error due to missing sctpConnection and dup… (#90)


#1

…licated compound expire checks.

This fixes the stack trace
{code}
at java.lang.Thread.run(Thread.java:745)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.jitsi.videobridge.rest.HandlerImpl.handle(HandlerImpl.java)
at org.jitsi.videobridge.rest.HandlerImpl.handleColibriJSON(HandlerImpl.java)
at org.jitsi.videobridge.rest.HandlerImpl.doPatchConferenceJSON(HandlerImpl.java)
at org.jitsi.videobridge.Videobridge.handleColibriConferenceIQ(Videobridge.java:987)
java.lang.NullPointerException
{code}

It looked like a duplicate check on expire meant a continue in the loop, so I combined the checks from both branches into a guard.

The issue is we checked for expire = 0 AND sctpConn = null to continue, and if sctpConn was null but expire was not 0, we would run into this exception.

You can view, comment on, or merge this pull request online at:

  https://github.com/jitsi/jitsi-videobridge/pull/90

-- Commit Summary --

  * fix: Patch Conference 500 error due to missing sctpConnection and duplicated compound expire checks

-- File Changes --

    M src/main/java/org/jitsi/videobridge/Videobridge.java (19)

-- Patch Links --

https://github.com/jitsi/jitsi-videobridge/pull/90.patch
https://github.com/jitsi/jitsi-videobridge/pull/90.diff

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/90


#2

Simplified the fix. Thanks for the feedback.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/90#issuecomment-144546591


#3

Thanks! The "continue" you added will only be followed if the bridge gets an sctp-connection request, with an "id" attribute, but we don't have a SctpConnection for that ID (right?). This might indicate a problem in signalling and I think it would be useful information to log. Before I merge the PR, could you please add a log message?

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/90#issuecomment-144564436


#4

Can one of the admins verify this patch?

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/90#issuecomment-192016152