Uploaded image for project: 'Bookkeeper'
  1. Bookkeeper
  2. BOOKKEEPER-87

TestHedwigHub exhausts direct buffer memory with netty 3.2.4.Final

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0
    • None
    • None

    Description

      The error below happens. This happens because the test starts and stops a lot of bookies, and hedwig hub for each test. Each of these allocates some Direct Buffer memory, which doesn't automatically get returned the the pool once the test is finished. The DirectByteBuffers do seem to be garbage collected, but they don't actually clean up the direct buffer memory until an internal cleaner runs later. I can't find a way to run this manually.

      This happens since BOOKKEEPER-65, as the new netty allocates more direct buffers. A work around for the problem for the moment is to run test with 1G heap.
      $ mvn test -DargLine="-Xmx1G"

      <snip>
      Running org.apache.hedwig.server.integration.TestHedwigHub
      Tests run: 92, Failures: 0, Errors: 47, Skipped: 0, Time elapsed: 60.523 sec <<< FAILURE!

      Results :

      Tests in error:
      testAsyncHubUnsubscribeWithInvalidSubscriberId[1](org.apache.hedwig.server.integration.TestHedwigHub): Direct buffer memory
      testManualConsumeClient[2](org.apache.hedwig.server.integration.TestHedwigHub): Direct buffer memory
      testManualConsumeClient[2](org.apache.hedwig.server.integration.TestHedwigHub)
      testAttachToSubscriptionSuccess[2](org.apache.hedwig.server.integration.TestHedwigHub): Direct buffer memory
      testAttachToSubscriptionSuccess[2](org.apache.hedwig.server.integration.TestHedwigHub)
      testServerRedirect[2](org.apache.hedwig.server.integration.TestHedwigHub): Direct buffer memory
      testServerRedirect[2](org.apache.hedwig.server.integration.TestHedwigHub)
      testSubscribeAndConsume[2](org.apache.hedwig.server.integration.TestHedwigHub): Direct buffer memory
      testSubscribeAndConsume[2](org.apache.hedwig.server.integration.TestHedwigHub)
      testServerFailoverPublishOnly[2](org.apache.hedwig.server.integration.TestHedwigHub): Direct buffer memory
      testServerFailoverPublishOnly[2](org.apache.hedwig.server.integration.TestHedwigHub)

      Attachments

        1. BOOKKEEPER-87.diff
          0.5 kB
          Ivan Kelly

        Activity

          People

            ikelly Ivan Kelly
            ikelly Ivan Kelly
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: