LEAK : ByteBuf.release was not called

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: 5.6.2
    • Component/s: Wire Protocol
    • None
    • Java Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      When using MongoDB Java Driver version 5.6.2 in combination with JDK 25.0.1 and Netty 4.2.9 (as provided by Spring Boot 4.0.1), a ByteBuf leak is reported at runtime:

      “LEAK: ByteBuf.release() was not called before it’s garbage-collected”

      The same application setup does not show this issue when using MongoDB Java Driver version 5.5.2. This suggests a regression introduced between driver versions 5.5.2 and 5.6.2 related to Netty buffer lifecycle management.

      The corresponding Netty leak log for a single leak is attached to this issue.

      Expected Result
      No ByteBuf leak warnings should be reported.

      Control Test
      Downgrading only the MongoDB Java Driver to version 5.5.2 while keeping all other components identical removes the leak warning completely.

        1. leak1.txt
          562 kB
          Michael Cornelius

            Assignee:
            Unassigned
            Reporter:
            Michael Cornelius
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: