[ https://issues.apache.org/jira/browse/STORM-874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14591296#comment-14591296 ]
ASF GitHub Bot commented on STORM-874: -------------------------------------- GitHub user kishorvpatil opened a pull request: https://github.com/apache/storm/pull/597 [STORM-874] Add UncaughtExceptionHandler for netty threads The netty threads need to handle uncaught exceptions. This would help ensure that JVM exits if netty threads hit OOM Error while allocating new buffer. You can merge this pull request into a Git repository by running: $ git pull https://github.com/kishorvpatil/incubator-storm storm874 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/storm/pull/597.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #597 ---- commit 6c4f8bf61fd5a4b86fc6df1bf33a2a90f5f5797e Author: Kishor Patil <kpa...@yahoo-inc.com> Date: 2015-06-17T21:15:51Z Add UncaughtExceptionHandler for netty threads as it should for JVM halt in case or OOM Error ---- > Netty Threads do not handle Errors properly > ------------------------------------------- > > Key: STORM-874 > URL: https://issues.apache.org/jira/browse/STORM-874 > Project: Apache Storm > Issue Type: Bug > Affects Versions: 0.9.2-incubating, 0.10.0 > Reporter: Kishor Patil > > When low on memory, netty thread could get OOM which if not handled correctly > can lead to unexpected behavior such as netty connection leaks. > {code:java} > java.lang.OutOfMemoryError: Direct buffer memory > at java.nio.Bits.reserveMemory(Bits.java:658) ~[?:1.8.0_25] > at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123) > ~[?:1.8.0_25] > at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311) ~[?:1.8.0_25] > at > org.jboss.netty.buffer.ChannelBuffers.directBuffer(ChannelBuffers.java:167) > ~[netty-3.9.4.Final.jar:?] > at > org.jboss.netty.buffer.ChannelBuffers.directBuffer(ChannelBuffers.java:151) > ~[netty-3.9.4.Final.jar:?] > at > backtype.storm.messaging.netty.MessageBatch.buffer(MessageBatch.java:101) > ~[storm-core-0.9.2-incubating-security.jar:0.9.2-incubating-security] > at > backtype.storm.messaging.netty.MessageEncoder.encode(MessageEncoder.java:32) > ~[storm-core-0.9.2-incubating-security.jar:0.9.2-incubating-security] > at > org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:66) > ~[netty-3.9.4.Final.jar:?] > at > org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59) > ~[netty-3.9.4.Final.jar:?] > at > org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591) > ~[netty-3.9.4.Final.jar:?] > at > org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582) > ~[netty-3.9.4.Final.jar:?] > at org.jboss.netty.channel.Channels.write(Channels.java:704) > ~[netty-3.9.4.Final.jar:?] > at org.jboss.netty.channel.Channels.write(Channels.java:671) > ~[netty-3.9.4.Final.jar:?] > at > org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) > ~[netty-3.9.4.Final.jar:?] > at > backtype.storm.messaging.netty.Client.tryDeliverMessages(Client.java:226) > ~[storm-core-0.9.2-incubating-security.jar:0.9.2-incubating-security] > at backtype.storm.messaging.netty.Client.send(Client.java:173) > ~[storm-core-0.9.2-incubating-security.jar:0.9.2-incubating-security] > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)