You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/07/11 12:52:04 UTC

[jira] [Commented] (STORM-874) Netty Threads do not handle Errors properly

    [ https://issues.apache.org/jira/browse/STORM-874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14623352#comment-14623352 ] 

ASF GitHub Bot commented on STORM-874:
--------------------------------------

Github user eshioji commented on the pull request:

    https://github.com/apache/storm/pull/597#issuecomment-120603640
  
    If the thread is used in `ThreadPoolExecutor` (like the boss & worker thread pool currently used), `UncaughtExceptionHandler` are not invoked because `ThreadPoolExecutor` suppress uncaught exceptions coming from tasks (see e.g. http://stackoverflow.com/questions/1838923/why-is-uncaughtexceptionhandler-not-called-by-executorservice). There are workarounds but they are quite hacky.
    
    Maybe it makes more sense to consider the service unhealthy if messages are unable to be dispatched, rather than based on whether an uncaught exception was encountered?


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