Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3733D9A76 for ; Fri, 27 Apr 2012 14:40:16 +0000 (UTC) Received: (qmail 62421 invoked by uid 500); 27 Apr 2012 14:40:15 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 62383 invoked by uid 500); 27 Apr 2012 14:40:15 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 62373 invoked by uid 99); 27 Apr 2012 14:40:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Apr 2012 14:40:15 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Apr 2012 14:40:11 +0000 Received: by mail-lb0-f173.google.com with SMTP id i15so671942lbo.32 for ; Fri, 27 Apr 2012 07:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=TVSSK1JHN024jQZLlsz4825Sts/JS7Ct8MCi4QxUp4Q=; b=rSPxVEEA36r+suU9Cwh2Zj13QXN2/hcXFkRmDNQ/rQw+T3XaJ7bVu9RUMXHlTTwpLh vA80EzwvGvuLMx3g7m9uTyDCUzk0z6YROBfgbkgJ/OswN5YXqVhZOsBTRW39VmZmau91 JJiWDM3oI+eie1tac2i3HsDCtLnpakHYJ8fhKq74kU4o5Z0od+Og2mow2FdiPXVi++hx kQj3BtFPmpyZIL2+JzYfuQVzmsqIXmdZ7Wxsk2bKxe7ydSplH7Wpbie/AUE0gHfxEmzS Pp+0ZYXIuXpZxB5B9QmNtBVT2ocegsveqfjy0U7+Y5o+tlVXuZHpCzoktWYYY0HSiQgC SYig== Received: by 10.152.132.233 with SMTP id ox9mr11060782lab.4.1335537590520; Fri, 27 Apr 2012 07:39:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.146.7 with HTTP; Fri, 27 Apr 2012 07:39:30 -0700 (PDT) In-Reply-To: <1335529038735-5670114.post@n5.nabble.com> References: <1335529038735-5670114.post@n5.nabble.com> From: Claus Ibsen Date: Fri, 27 Apr 2012 16:39:30 +0200 Message-ID: Subject: Re: camel-netty deadlock when using split in route To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 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 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 messa= ges > 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 mess= age > is sent to the netty component, then the route works just fine. But if th= e > 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 seco= nd > 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") > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0.setExchangePattern(ExchangePattern.InOnly= ) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0.split(body(String.class).tokenize(",")) > > .to("netty:tcp://127.0.0.1:54321?sync=3Dfalse&disconnect=3Dtrue)"); > > And a receiving endpoint: > from("netty:tcp://127.0.0.1:54321?sync=3Dfalse&disconnect=3Dtrue").to("mo= ck:mockEndoint"); > > The following message will cause the IllegalStateException: > producerTemplate.sendBody("direct:testSplit", "firstMessage,secondMessage= "); > > Here is the stacktrace: > [ =A0 =A0New I/O client worker #1-1] DefaultErrorHandler =A0 =A0 =A0 =A0 = =A0 =A0ERROR Failed > delivery for exchangeId: ID-andersl-THINK-54674-1335528700647-0-4. Exhaus= ted > 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 loc= k > or sudden performance drop. Use addListener() instead or call await*() fr= om > a different thread. > =A0 =A0 =A0 =A0at > org.jboss.netty.channel.DefaultChannelFuture.checkDeadLock(DefaultChannel= Future.java:296)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:] > =A0 =A0 =A0 =A0at > org.jboss.netty.channel.DefaultChannelFuture.awaitUninterruptibly(Default= ChannelFuture.java:208)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.j= ar:] > =A0 =A0 =A0 =A0at > org.apache.camel.component.netty.NettyProducer.openChannel(NettyProducer.= java:275)[camel-netty-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.component.netty.NettyProducer.process(NettyProducer.java= :152)[camel-netty-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.j= ava:78)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcesso= r.java:114)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:= 286)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:109)[= camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.j= ava:78)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsy= ncProcessor.java:98)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncPr= ocessor.java:89)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInte= rceptor.java:172)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.j= ava:78)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsy= ncProcessor.java:98)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncPr= ocessor.java:89)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.interceptor.Debug$1.process(Debug.java:50)[cam= el-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.j= ava:78)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(Red= eliveryErrorHandler.java:318)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryError= Handler.java:209)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:305= )[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.j= ava:78)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(Red= eliveryErrorHandler.java:318)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryError= Handler.java:209)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcesso= r.java:102)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.j= ava:78)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.MulticastProcessor.doProcessSequential(Multica= stProcessor.java:572)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.MulticastProcessor.access$600(MulticastProcess= or.java:79)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.MulticastProcessor$2.done(MulticastProcessor.j= ava:622)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor= .java:107)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.RedeliveryErrorHandler$1.done(RedeliveryErrorH= andler.java:330)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:311)= [camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.RedeliveryErrorHandler$1.done(RedeliveryErrorH= andler.java:330)[camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.interceptor.Debug$1$1.done(Debug.java:56)[came= l-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.processor.SendProcessor$2$1.done(SendProcessor.java:119)= [camel-core-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.apache.camel.component.netty.NettyProducer$1.operationComplete(NettyP= roducer.java:199)[camel-netty-2.8.0.jar:2.8.0] > =A0 =A0 =A0 =A0at > org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChanne= lFuture.java:381)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:] > =A0 =A0 =A0 =A0at > org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChann= elFuture.java:367)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:] > =A0 =A0 =A0 =A0at > org.jboss.netty.channel.DefaultChannelFuture.setSuccess(DefaultChannelFut= ure.java:316)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:] > =A0 =A0 =A0 =A0at > org.jboss.netty.channel.socket.nio.NioWorker.write0(NioWorker.java:486)[o= rg.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:] > =A0 =A0 =A0 =A0at > org.jboss.netty.channel.socket.nio.NioWorker.writeFromTaskLoop(NioWorker.= java:392)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:] > =A0 =A0 =A0 =A0at > org.jboss.netty.channel.socket.nio.NioSocketChannel$WriteTask.run(NioSock= etChannel.java:276)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:] > =A0 =A0 =A0 =A0at > org.jboss.netty.channel.socket.nio.NioWorker.processWriteTaskQueue(NioWor= ker.java:268)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:] > =A0 =A0 =A0 =A0at > org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:199)[org.= apache.servicemix.bundles.netty-3.2.4.Final_1.jar:] > =A0 =A0 =A0 =A0at > org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.ja= va:108)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:] > =A0 =A0 =A0 =A0at > org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWork= er.java:44)[org.apache.servicemix.bundles.netty-3.2.4.Final_1.jar:] > =A0 =A0 =A0 =A0at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor= .java:886)[:1.6.0_31] > =A0 =A0 =A0 =A0at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav= a:908)[:1.6.0_31] > =A0 =A0 =A0 =A0at java.lang.Thread.run(Thread.java:662)[:1.6.0_31] > > -- > View this message in context: http://camel.465427.n5.nabble.com/camel-net= ty-deadlock-when-using-split-in-route-tp5670114p5670114.html > Sent from the Camel - Users mailing list archive at Nabble.com. --=20 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/