Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3087

Buffer leak when network compression enabled

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 3.9.1
    • Affects Version/s: 3.7.0
    • Component/s: Wire Protocol
    • Labels:
      None
    • Environment:
      Ubuntu linux LTS 18.x
      MongoDB Atlas 3.6.8
      Mongo-scala-driver 2.3
      Scala 2.11.11

      We have been running same s/w and configuration for couple of months with no issue and on 26 Oct we made change to RestFul server configuration to enable network compression using snappy by setting compressor=snappy when initialising mongo-scala-driver, but yesterday (8th Nov) we had system failure and clients were getting “Exception Boxed Error” on our web application (Running liftweb 3.1 on Jetty 9.2.13).

      Our system as seen from client end is angularjs -> liftweb application (running on jetty) -> AKKA-Http RestFul server with mongo-scala-driver -> Atlas Mongo.

      Only error I see in restFul log files is "ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected”. Looking through log files the earlies I see the error is on the 26 - tied to same day we made change to enable network compression.

      We have production and pre-stage systems, both employing same software versions, one using M40 Mongo Atlas and the other M10 Mongo Atlas - both show this error.
      On my development server which is running same s/w on same Linux version but communicating to single instance MongoDB (same version as production and pre-stage) does not show this error with same snappy compression added.

      If I disable snappy compression on pre-staging and production server then it appears that I don't see the error. Time is still to early to tell if this is fact or not, but if I enable the compression I see error within 30 minutes. I have disabled compression for 3 hours now and have not yet seen the error.

      I enabled advanced logging to try and pinpoint memory leak which lead me to mongodb - I have attached log file after restarting server.

      Is there by chance a know issue with enabling compression?
      I assume from my end there is no different in coding solution if compression is enabled or not?

      I am hoping someone can help guide me in right direction.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            colin.bester@advancedbiotechnologiesllc.com Colin Bester
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: