Received a suspiciously large buffer (size = 15436)

Hi!

Yesterday we had some troubles with one conference. In the jvb.log we’ve found the following repeating entries:

JVB 2021-11-10 21:26:21.324 WARNUNG: [79] ByteBufferPool.returnBuffer#226: Received a suspiciously large buffer (size = 15436)
 +java.base/java.lang.Thread.getStackTrace(Thread.java:1602)
org.jitsi.nlj.util.UtilKt.getStackTrace(Util.kt:67)
org.jitsi.videobridge.util.ByteBufferPool.returnBuffer(ByteBufferPool.java:228)
org.jitsi.videobridge.Videobridge.lambda$static$0(Videobridge.java:136)
org.jitsi.rtp.ByteArrayBufferImpl.grow(ByteArrayBufferImpl.java:137)
org.jitsi.srtp.SrtcpCryptoContext.transformPacket(SrtcpCryptoContext.java:460)
org.jitsi.nlj.srtp.SrtcpEncryptTransformer.transform(SrtpTransformer.kt:159)
org.jitsi.nlj.srtp.SrtcpEncryptTransformer.transform(SrtpTransformer.kt:153)
org.jitsi.nlj.srtp.AbstractSrtpTransformer.transform(SrtpTransformer.kt:90)
org.jitsi.nlj.transform.node.SrtpTransformerNode.transform(SrtpTransformerNode.kt:82)
org.jitsi.nlj.transform.node.MultipleOutputTransformerNode.doProcessPacket(Node.kt:466)
org.jitsi.nlj.transform.node.StatsKeepingNode.processPacket(Node.kt:206)
org.jitsi.nlj.transform.node.Node.next(Node.kt:107)
org.jitsi.nlj.transform.node.NeverDiscardNode.doProcessPacket(Node.kt:363)
org.jitsi.nlj.transform.node.StatsKeepingNode.processPacket(Node.kt:206)
org.jitsi.nlj.transform.node.Node.next(Node.kt:107)
org.jitsi.nlj.transform.node.TransformerNode.doProcessPacket(Node.kt:380)
org.jitsi.nlj.transform.node.StatsKeepingNode.processPacket(Node.kt:206)
org.jitsi.nlj.transform.node.Node.next(Node.kt:107)
org.jitsi.nlj.transform.node.TransformerNode.doProcessPacket(Node.kt:380)
org.jitsi.nlj.transform.node.StatsKeepingNode.processPacket(Node.kt:206)
org.jitsi.nlj.transform.node.Node.next(Node.kt:107)
org.jitsi.nlj.transform.node.NeverDiscardNode.doProcessPacket(Node.kt:363)
org.jitsi.nlj.transform.node.StatsKeepingNode.processPacket(Node.kt:206)
org.jitsi.nlj.transform.node.Node.next(Node.kt:107)
org.jitsi.nlj.transform.node.TransformerNode.doProcessPacket(Node.kt:380)
org.jitsi.nlj.transform.node.StatsKeepingNode.processPacket(Node.kt:206)
org.jitsi.nlj.RtpSenderImpl.handlePacket(RtpSenderImpl.kt:269)
org.jitsi.nlj.RtpSenderImpl.access$handlePacket(RtpSenderImpl.kt:67)
org.jitsi.nlj.RtpSenderImpl$incomingPacketQueue$1.invoke(RtpSenderImpl.kt:93)
org.jitsi.nlj.RtpSenderImpl$incomingPacketQueue$1.invoke(RtpSenderImpl.kt:93)
org.jitsi.nlj.util.PacketInfoQueue._init_$lambda-0(PacketInfoQueue.kt:31)
org.jitsi.utils.queue.PacketQueue$HandlerAdapter.handleItem(PacketQueue.java:381)
org.jitsi.utils.queue.AsyncQueueHandler$1.run(AsyncQueueHandler.java:133)
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base/java.lang.Thread.run(Thread.java:829)

JVB 2021-11-10 21:26:21.324 WARNUNG: [427] ByteBufferPool.returnBuffer#226: Received a suspiciously large buffer (size = 15456)
 +java.base/java.lang.Thread.getStackTrace(Thread.java:1602)
org.jitsi.nlj.util.UtilKt.getStackTrace(Util.kt:67)
org.jitsi.videobridge.util.ByteBufferPool.returnBuffer(ByteBufferPool.java:228)
org.jitsi.videobridge.Endpoint.doSendSrtp(Endpoint.kt:450)
org.jitsi.videobridge.Endpoint.access$doSendSrtp(Endpoint.kt:99)
org.jitsi.videobridge.Endpoint$outgoingSrtpPacketQueue$1.invoke(Endpoint.kt:177)
org.jitsi.videobridge.Endpoint$outgoingSrtpPacketQueue$1.invoke(Endpoint.kt:177)
org.jitsi.nlj.util.PacketInfoQueue._init_$lambda-0(PacketInfoQueue.kt:31)
org.jitsi.utils.queue.PacketQueue$HandlerAdapter.handleItem(PacketQueue.java:381)
org.jitsi.utils.queue.AsyncQueueHandler$1.run(AsyncQueueHandler.java:133)
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base/java.lang.Thread.run(Thread.java:829)

Our versions:

ii jitsi-meet 2.0.6433-1 all WebRTC JavaScript video conferences
ii jitsi-meet-prosody 1.0.5415-1 all Prosody configuration for Jitsi Meet
ii jitsi-meet-web 1.0.5415-1 all WebRTC JavaScript video conferences
ii jitsi-meet-web-config 1.0.5415-1 all Configuration for web serving of Jitsi Meet
ii jitsi-videobridge2 2.1-570-gb802be83-1 all WebRTC compatible Selective Forwarding Unit (SFU)

I have looked at the code and it does not necessarily mean an error, the developer has when he wrote this expected that the calling software would almost never allocate such buffers and he triggered the stack trace to understand from where it happened (there is no exception in this case despite the trace).
What could have happened is that the software could have been changed by another dev and this is triggering larger buffer allocations. So this could be normal. If you still experience problems, try to eliminate other possible reasons, maybe try to check with unstable, and if nothing helps create an issue (with more detaiils) on the jitsi-videobridge github; the developer who wrote this warning will probably read it there, not necessarily here.

1 Like

We are observing the same behavior on several video bridges and also see users dropping out of meetings when large buffer sizes occur. Submitted a report suspiciously large buffer stack traces · Issue #1769 · jitsi/jitsi-videobridge · GitHub

@rasos Thanks for submitting an issue!