Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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)