camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: camel-netty deadlock when using split in route
Date Fri, 27 Apr 2012 14:39:30 GMT
Hi

Can you try with 2.10 SNAPSHOT as camel-netty have been improved in
that release.


On Fri, Apr 27, 2012 at 2:17 PM, andlu702 <anders.lunden@r2m.se> wrote:
> I found dead post on this forum which seem quite similar to the problem I'm
> experiencing, but I decided to create a new thread instead of waking up a
> zombie. Similar error:
> http://camel.465427.n5.nabble.com/await-deadlock-on-netty-td4901708.html#none
> http://camel.465427.n5.nabble.com/await-deadlock-on-netty-td4901708.html#none
>
> I have a route which splits (and transforms) a message into several messages
> before sent to a netty endpoint.
> The split may or may not actually split the message depending on the body of
> the incoming message. If the message is not split, and only a single message
> is sent to the netty component, then the route works just fine. But if the
> message is split in to at least two different messages I get an
> IllegalStateException (as shown below) on the sending side.
> The first message arrives at the receiving side as it should but the second
> one ends with the IllegalStateException.
>
> I'm using camel 2.8.0. Any help is appreciated.
>
> Here is a simplified route which cause the same error:
>
> from("direct:testSplit")
>                .setExchangePattern(ExchangePattern.InOnly)
>                .split(body(String.class).tokenize(","))
>
> .to("netty:tcp://127.0.0.1:54321?sync=false&disconnect=true)");
>
> And a receiving endpoint:
> from("netty:tcp://127.0.0.1:54321?sync=false&disconnect=true").to("mock:mockEndoint");
>
> The following message will cause the IllegalStateException:
> producerTemplate.sendBody("direct:testSplit", "firstMessage,secondMessage");
>
> Here is the stacktrace:
> [    New I/O client worker #1-1] DefaultErrorHandler            ERROR Failed
> delivery for exchangeId: ID-andersl-THINK-54674-1335528700647-0-4. Exhausted
> after delivery attempt: 1 caught: 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.
> 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:296)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> org.jboss.netty.channel.DefaultChannelFuture.awaitUninterruptibly(DefaultChannelFuture.java:208)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> org.apache.camel.component.netty.NettyProducer.openChannel(NettyProducer.java:275)[camel-netty-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.component.netty.NettyProducer.process(NettyProducer.java:152)[camel-netty-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:114)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:286)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:109)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:172)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.interceptor.Debug$1.process(Debug.java:50)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:572)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.MulticastProcessor.access$600(MulticastProcessor.java:79)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.MulticastProcessor$2.done(MulticastProcessor.java:622)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:107)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.RedeliveryErrorHandler$1.done(RedeliveryErrorHandler.java:330)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:311)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.RedeliveryErrorHandler$1.done(RedeliveryErrorHandler.java:330)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.interceptor.Debug$1$1.done(Debug.java:56)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.processor.SendProcessor$2$1.done(SendProcessor.java:119)[camel-core-2.8.0.jar:2.8.0]
>        at
> org.apache.camel.component.netty.NettyProducer$1.operationComplete(NettyProducer.java:199)[camel-netty-2.8.0.jar:2.8.0]
>        at
> org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:381)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:367)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> org.jboss.netty.channel.DefaultChannelFuture.setSuccess(DefaultChannelFuture.java:316)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> org.jboss.netty.channel.socket.nio.NioWorker.write0(NioWorker.java:486)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> org.jboss.netty.channel.socket.nio.NioWorker.writeFromTaskLoop(NioWorker.java:392)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> org.jboss.netty.channel.socket.nio.NioSocketChannel$WriteTask.run(NioSocketChannel.java:276)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> org.jboss.netty.channel.socket.nio.NioWorker.processWriteTaskQueue(NioWorker.java:268)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:199)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:]
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_31]
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_31]
>        at java.lang.Thread.run(Thread.java:662)[:1.6.0_31]
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-netty-deadlock-when-using-split-in-route-tp5670114p5670114.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message