Camel
  1. Camel
  2. CAMEL-6442

camel-netty-http route throws java.lang.IllegalStateException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.10.4, 2.11.0
    • Fix Version/s: 2.10.5, 2.11.1, 2.12.0
    • Component/s: camel-netty
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      I just create a simple proxy route by using camel-netty-http component like this

              <route id="front">
                  <from uri="netty-http:http://0.0.0.0:9001/test" />
                  <to uri="netty-http:http://localhost:9090/foo" />
              </route>
      
              <route id="back">
                  <from uri="netty-http:http://0.0.0.0:9090/foo" />
                  <transform>
                    <simple>hello world</simple>
                  </transform>
              </route>
      
      

      When I send the get request to http://localhost:9001/test, I got below exception

      java.lang.IllegalStateException: await*() in I/O thread causes a dead lock or sudden performance drop. Use addListener() instead or call await*() from a different thread.
      	at org.jboss.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannelFuture.java:342)
      	at org.jboss.netty.channel.DefaultChannelFuture.await0(DefaultChannelFuture.java:306)
      	at org.jboss.netty.channel.DefaultChannelFuture.awaitUninterruptibly(DefaultChannelFuture.java:285)
      	at org.apache.camel.component.netty.NettyProducer.openChannel(NettyProducer.java:402)
      	at org.apache.camel.component.netty.NettyProducer$NettyProducerPoolableObjectFactory.makeObject(NettyProducer.java:473)
      	at org.apache.camel.component.netty.NettyProducer$NettyProducerPoolableObjectFactory.makeObject(NettyProducer.java:468)
      	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
      	at org.apache.camel.component.netty.NettyProducer.process(NettyProducer.java:210)
      	at org.apache.camel.component.netty.http.NettyHttpProducer.process(NettyHttpProducer.java:49)
      	at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:123)
      	at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)
      	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:118)
      	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:388)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:189)
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:189)
      	at org.apache.camel.component.netty.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:118)
      	at org.apache.camel.component.netty.handlers.ServerChannelHandler.messageReceived(ServerChannelHandler.java:102)
      	at org.apache.camel.component.netty.http.handlers.HttpServerChannelHandler.messageReceived(HttpServerChannelHandler.java:97)
      	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
      	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
      	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
      	at org.jboss.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:145)
      	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
      	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
      	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
      	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
      	at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:459)
      	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)
      	at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
      	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
      	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
      	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
      	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
      	at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
      	at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
      	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
      	at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
      	at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
      	at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
      	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
      	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at java.lang.Thread.run(Thread.java:680)
      

        Issue Links

          Activity

          Willem Jiang created issue -
          Hide
          Willem Jiang added a comment -

          Applied the patch and unit test into trunk.
          Here is the blog which helped me to resolve the issue.

          Show
          Willem Jiang added a comment - Applied the patch and unit test into trunk. Here is the blog which helped me to resolve the issue.
          Willem Jiang made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Willem Jiang [ njiang ]
          Resolution Fixed [ 1 ]
          Claus Ibsen made changes -
          Fix Version/s 2.10.5 [ 12324024 ]
          Fix Version/s 2.11.1 [ 12323967 ]
          Affects Version/s 2.11.0 [ 12321695 ]
          Affects Version/s 2.10.4 [ 12323558 ]
          Component/s camel-netty [ 12313932 ]
          kiran kumar reddy made changes -
          Link This issue is related to CAMEL-6449 [ CAMEL-6449 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          17h 9m 1 Willem Jiang 09/Jun/13 03:02

            People

            • Assignee:
              Willem Jiang
              Reporter:
              Willem Jiang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development