Seeing a lot of warnings about in JVB about buffer size

Seeing a ton of warnings (sometimes for what looks like every RTP packet coming through) that look like the following. Is this an actual issue we should be worried about? Or something that we can safely ignore.

Received a suspiciously large buffer (size = 1242)
 +java.base/java.lang.Thread.getStackTrace(Thread.java:1606)
org.jitsi.nlj.util.UtilKt.getStackTrace(Util.kt:53)
org.jitsi.videobridge.util.ByteBufferPool.returnBuffer(ByteBufferPool.java:238)
org.jitsi.videobridge.Endpoint.doSendSrtp(Endpoint.java:551)
org.jitsi.nlj.util.PacketInfoQueue$sam$org_jitsi_utils_queue_PacketQueue_PacketHandler$0.handlePacket(PacketInfoQueue.kt)
org.jitsi.utils.queue.PacketQueue$HandlerAdapter.handleItem(PacketQueue.java:575)
org.jitsi.utils.queue.AsyncQueueHandler$1.run(AsyncQueueHandler.java:141)
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:834)

Running anything different there? Different codecs, for example?

Not that I’m aware of. Opus + VP8. Not anything special I don’t think.

Hm, that message is strange, actually, because it should only log that if the size is >= 2000: https://github.com/jitsi/jitsi-videobridge/blob/master/jvb/src/main/java/org/jitsi/videobridge/util/ByteBufferPool.java#L230-L239. What version of the bridge is this?

Ah fascinating. Yeah that’s true; I don’t know what’s happening on our side. Thanks for that heads up, I’ll take a closer look.

@bbaldino so it looks like in the end it was a modification we made to JVB code to swap out the 2000 for a T3. But now I’m confused because it seems like this line https://github.com/jitsi/jitsi-videobridge/blob/2485f7107dee16721768fa594dcd2d01d0231714/jvb/src/main/java/org/jitsi/videobridge/util/ByteBufferPool.java#L230-L239 here would conflict with https://github.com/jitsi/jitsi-videobridge/blob/2485f7107dee16721768fa594dcd2d01d0231714/jvb/src/main/java/org/jitsi/videobridge/util/ByteBufferPool.java#L157

There isn’t anything wrong with not reusing T3 in the latter case, but it seems like JVB can end up with a lot of overly large byte arrays (i.e. greater than T3) in its buffer. Is that an issue at all?

I think the reason for those 2 things differing is that just because there are some buffers larger than T3's main buffer size, it doesn’t mean they will all satisfy that. To use the larger number (2000) here would mean that we’d potentially have to search through a lot of buffers to find one that is large enough, as most of the buffers in that pool should be <= 1200 bytes. The idea is that the vast majority of buffer sizes should fit within the set values, and anything larger should be an exception.

If you want to change things there to support larger buffers, I’d look at changing the values of T1, T2 and T3.

We found that we ran into this same issue and realized there is an issue here (as was also reported by some other community members). Fix coming soon.

EDIT: https://github.com/jitsi/jitsi-videobridge/pull/1485

Awesome! Thanks for the heads up