You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/05/29 17:14:19 UTC

[GitHub] [activemq-artemis] franz1981 opened a new pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

franz1981 opened a new pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154


   Netty's `UnreleasableByteBuf::readBytes(int length)` allocates a direct `ByteBuf` without `Cleaner` that can leak and cause OOM on `ChannelBufferWrapper::readBytes(final int length)`


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] sebthom commented on pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
sebthom commented on pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154#issuecomment-637422247


   @franz1981 @clebertsuconic is this an issue that was introduced in 2.12.0? We are currently running 2.11.0 in production and thinking about upgrading to 2.13.0


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] franz1981 edited a comment on pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
franz1981 edited a comment on pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154#issuecomment-636121319


   Although it seems like a Netty issue, it's not: the problem is on `ChannelBufferWrapper` because it's using `UnreleasableByteBuf::readBytes(int length)` and wrapping its returned `ByteBuf` (which nature depends on the wrapped `ByteBuf::alloc`) into an `UnreleaeasableByteBuf` that would prevent it to be released and correctly deallocated. 
   
   This PR is both:
   
   - avoiding using an intermediate `readBytes` + `toByteBuffer` to read into a `byte[]` the data
   - removing the wrong method on `ChanneBufferWrapper` given that isn't used anymore


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] clebertsuconic commented on pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154#issuecomment-638432610


   @sebthom  this has been an issue since at least 2.6.0, possibly longer as I believe I copied the code from somewhere else when I committed e86acd4824d3a94d124693fbd7887a1f1b9b072c


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] clebertsuconic commented on pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154#issuecomment-638437845


   @sebthom I actually am...
   
   although I'm not branching 2.13.. I will release from master.. and if there are features it promotes the number to 2.14.0...
   
   Since there's nothing breaking any compatibility, I'm considering just releasing from master.


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] franz1981 commented on pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
franz1981 commented on pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154#issuecomment-636121319


   Although it seems like a Netty issue, it's not: the problem is on `ChannelBufferWrapper` because it's using `UnreleasableByteBuf::readBytes(int length)` and wrapping its returned `ByteBuf` (which nature depends on the wrapped allocator) into an `UnreleaeasableByteBuf` that would prevent it to be released and correctly deallocated. 
   
   This PR is both:
   
   - avoiding using an intermediate `readBytes` + `toByteBuffer` to read into a `byte[]` the data
   - removing the wrong method on `ChanneBufferWrapper` given that isn't used anymore


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] asfgit closed pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154


   


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] michaelandrepearce commented on pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154#issuecomment-638446243


   @clebertsuconic we have a feature needed just finishing it up. As had a prod issue. Can you hold any release for a day or two so i can get it in please 


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] michaelandrepearce commented on pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
michaelandrepearce commented on pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154#issuecomment-639167912


   @clebertsuconic as mentioned before next release id like https://github.com/apache/activemq-artemis/pull/3169 included (now pr'd)


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] clebertsuconic commented on pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
clebertsuconic commented on pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154#issuecomment-636133627


   perhaps we should consider release 2.13.1 soon because of this?


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] michaelandrepearce edited a comment on pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
michaelandrepearce edited a comment on pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154#issuecomment-639167912


   @clebertsuconic as mentioned before next release id like https://github.com/apache/activemq-artemis/pull/3169 included (now pr'd) needed because of issue seen in prod, so next time get issue with all shared subscription queue not being consumed we can keep consumers active and then investigate the issue without risking message build up, but without affecting other queues (shared subs) on the same address


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] sebthom commented on pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
sebthom commented on pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154#issuecomment-638435326


   @clebertsuconic Thanks for the update. I think then we are safe in our scenario to upgrade. We did not experience a memory leak so far. Are you still considering a 2.13.1 release?


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] asfgit merged pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
asfgit merged pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154


   


----------------------------------------------------------------
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



[GitHub] [activemq-artemis] franz1981 edited a comment on pull request #3154: ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress

Posted by GitBox <gi...@apache.org>.
franz1981 edited a comment on pull request #3154:
URL: https://github.com/apache/activemq-artemis/pull/3154#issuecomment-636121319


   Although it seems like a Netty issue, it's not: the problem is on `ChannelBufferWrapper` because it's using `UnreleasableByteBuf::readBytes(int length)` and wrapping its returned `ByteBuf` (which nature depends on the wrapped `ByteBuf::alloc`) into an `UnreleaeasableByteBuf` that would prevent it to be released and correctly deallocated. 
   
   This PR is both:
   
   - avoiding using an intermediate `readBytes` + `toByteBuffer` to read the data into a `byte[]`
   - removing the wrong method on `ChanneBufferWrapper` given that isn't used anymore


----------------------------------------------------------------
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