Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-1641

Quickly reconnecting with Netty Avro RPC client causes OOME from lack of direct memory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Client SDK
    • None

    Description

      There is an issue where a OutOfMemoryError can occur from too-quick reconnection attempts. Stack trace:

      Exception in thread "main" java.lang.OutOfMemoryError: Direct buffer memory
      at java.nio.Bits.reserveMemory(Bits.java:632)
      at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:97)
      at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
      at org.jboss.netty.channel.socket.nio.SocketSendBufferPool$Preallocation.<init>(SocketSendBufferPool.java:156)
      at org.jboss.netty.channel.socket.nio.SocketSendBufferPool.<init>(SocketSendBufferPool.java:43)
      at org.jboss.netty.channel.socket.nio.NioWorker.<init>(NioWorker.java:84)
      at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.<init>(NioClientSocketPipelineSink.java:74)
      at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.<init>(NioClientSocketChannelFactory.java:135)
      at org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.<init>(NioClientSocketChannelFactory.java:105)
      at org.apache.avro.ipc.NettyTransceiver.<init>(NettyTransceiver.java:116)
      at org.apache.flume.api.NettyAvroRpcClient.connect(NettyAvroRpcClient.java:120)
      at org.apache.flume.api.NettyAvroRpcClient.connect(NettyAvroRpcClient.java:109)
      at org.apache.flume.api.NettyAvroRpcClient.<init>(NettyAvroRpcClient.java:94)
      at org.apache.flume.api.RpcClientFactory.getDefaultInstance(RpcClientFactory.java:131)
      at org.apache.flume.api.RpcClientFactory.getDefaultInstance(RpcClientFactory.java:107)
      at org.apache.flume.api.FailoverRpcClient.getNextClient(FailoverRpcClient.java:270)
      at org.apache.flume.api.FailoverRpcClient.getClient(FailoverRpcClient.java:140)
      at org.apache.flume.api.FailoverRpcClient.append(FailoverRpcClient.java:174)
      ... snip ...

      Appears to be related to https://issues.jboss.org/browse/NETTY-424

      Attachments

        Activity

          People

            Unassigned Unassigned
            mpercy Mike Percy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: