[ https://issues.apache.org/jira/browse/ARTEMIS-2482?focusedWorklogId=310156&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-310156 ]
ASF GitHub Bot logged work on ARTEMIS-2482: ------------------------------------------- Author: ASF GitHub Bot Created on: 10/Sep/19 22:24 Start Date: 10/Sep/19 22:24 Worklog Time Spent: 10m Work Description: franz1981 commented on issue #2832: ARTEMIS-2482 Large messages could leak native ByteBuffers URL: https://github.com/apache/activemq-artemis/pull/2832#issuecomment-530138441 @wy96f please take a look that you've recently have fun with `ByteBuf`s :) I see too that the change introduced with has a memory leak similar to the one of this PR on https://github.com/apache/activemq-artemis/blob/e537fbfde06a5a09ef369401e715970c4003bd32/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java#L149 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 310156) Time Spent: 1h 40m (was: 1.5h) > Large messages could leak native ByteBuffers > -------------------------------------------- > > Key: ARTEMIS-2482 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2482 > Project: ActiveMQ Artemis > Issue Type: Bug > Components: AMQP, Broker, OpenWire > Affects Versions: 2.10.0 > Reporter: Francesco Nigro > Priority: Major > Time Spent: 1h 40m > Remaining Estimate: 0h > > JournalStorageManager::addBytesToLargeMessage and > LargeServerMessageImpl::DecodingContext::encode are relying on the pooling of > direct ByteBuffers performed internally by NIO. > Those buffers are pooled until certain size limit (ie > jdk.nio.maxCachedBufferSize, as shown on > https://bugs.openjdk.java.net/browse/JDK-8147468) otherwise are freed right > after the write succeed. > If the property jdk.nio.maxCachedBufferSize isn't set, the direct buffers are > always pooled regardless of the size, leading to OOM issues on high load of > variable sized writes due to the amount of direct memory allocated and not > released/late released. > This should be an alternative fix for > https://issues.apache.org/jira/browse/ARTEMIS-1811 and it check if such > pooling is happening, making large messages to be read/written in chunks by > using the Netty ByteBuf pool to handle any intermediate buffer. -- This message was sent by Atlassian Jira (v8.3.2#803003)