You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/09/10 17:28:00 UTC

[jira] [Work logged] (ARTEMIS-2482) Large messages could leak native ByteBuffers

     [ https://issues.apache.org/jira/browse/ARTEMIS-2482?focusedWorklogId=309982&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-309982 ]

ASF GitHub Bot logged work on ARTEMIS-2482:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Sep/19 17:27
            Start Date: 10/Sep/19 17:27
    Worklog Time Spent: 10m 
      Work Description: franz1981 commented on pull request #2832: ARTEMIS-2482 Large messages could leak native ByteBuffers
URL: https://github.com/apache/activemq-artemis/pull/2832
 
 
   Perform chunked read/write of large message files to save
   NIO from leaking native ByBuffers:
   see https://bugs.openjdk.java.net/browse/JDK-8147468
 
----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 309982)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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: 10m
>  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)