Hello,

with camel 2.14.1 and mina 2.0.9 i have some trouble with stopping a route 
(currently primarly in a unit test). 

In a Junit @After, i stop a route that where added in a @Before (so add a 
mock route and remove it afterwards).
camelContext.stopRoute(...);

Sporadically (sometimes everything is fine) this call (stopRoute) run 
infinite, so i have to kill the process. The timeouts in camelContext 
(5min) and the mina producer seems to be ignored.
Previously i was on camel 2.12.1 and mina 2.0.7, there i have never seen 
such an issue.

I have not quiet sure if the camel component or mina is the reason for 
this issue. 

Here my stacktrace which i captured with jstack while my unit test hang 
(for hours).
***********************************
"main" prio=10 tid=0x08051400 nid=0x3663 in Object.wait() [0xf688e000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0xc6e46cf0> (a 
org.apache.mina.core.future.DefaultCloseFuture)
        at 
org.apache.mina.core.future.DefaultIoFuture.await0(DefaultIoFuture.java:192)
        - locked <0xc6e46cf0> (a 
org.apache.mina.core.future.DefaultCloseFuture)
        at 
org.apache.mina.core.future.DefaultIoFuture.awaitUninterruptibly(DefaultIoFuture.java:133)
        at 
org.apache.mina.core.future.DefaultCloseFuture.awaitUninterruptibly(DefaultCloseFuture.java:56)
        at 
org.apache.camel.component.mina2.Mina2Producer.closeConnection(Mina2Producer.java:247)
        at 
org.apache.camel.component.mina2.Mina2Producer.doStop(Mina2Producer.java:232)
        at 
org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102)
        at 
org.openehealth.ipf.platform.camel.ihe.hl7v2.intercept.producer.Interceptor2ProducerAdapter.stop(Interceptor2ProducerAdapter.java:73)
        at 
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:141)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:163)
        at 
org.apache.camel.impl.DefaultServicePool.doStop(DefaultServicePool.java:113)
        at 
org.apache.camel.impl.SharedProducerServicePool.doShutdown(SharedProducerServicePool.java:46)
        at 
org.apache.camel.support.ServiceSupport.shutdown(ServiceSupport.java:168)
        at 
org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:210)
        at 
org.apache.camel.impl.ProducerCache.doStop(ProducerCache.java:430)
        at 
org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102)
        at 
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:141)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:163)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:121)
        at 
org.apache.camel.processor.SendProcessor.doStop(SendProcessor.java:233)
        at 
org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102)
        at 
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:141)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:163)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:121)
        at 
org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:83)
        at 
org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102)
        at 
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:141)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:163)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:121)
        at 
org.apache.camel.processor.interceptor.DefaultChannel.doStop(DefaultChannel.java:158)
        at 
org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102)
        at 
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:141)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:163)
        at 
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:143)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:163)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:121)
        at 
org.apache.camel.processor.MulticastProcessor.doStop(MulticastProcessor.java:1044)
        at 
org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102)
        at 
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:141)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:163)
        at 
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:121)
        at 
org.apache.camel.processor.DelegateAsyncProcessor.doStop(DelegateAsyncProcessor.java:83)
        at 
org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102)
        at 
org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:141)
        at 
org.apache.camel.impl.RouteService.stopChildService(RouteService.java:355)
        at 
org.apache.camel.impl.RouteService.doStop(RouteService.java:222)
        at 
org.apache.camel.support.ChildServiceSupport.stop(ChildServiceSupport.java:77)
        at 
org.apache.camel.support.ChildServiceSupport.stop(ChildServiceSupport.java:101)
        at 
org.apache.camel.impl.DefaultCamelContext.stopRouteService(DefaultCamelContext.java:2248)
        - locked <0xbbb608f8> (a 
org.apache.camel.spring.SpringCamelContext)
        at 
org.apache.camel.impl.DefaultCamelContext.stopRouteService(DefaultCamelContext.java:2234)
        - locked <0xbbb608f8> (a 
org.apache.camel.spring.SpringCamelContext)
        at 
org.apache.camel.impl.DefaultCamelContext.stopRoute(DefaultCamelContext.java:879)
        - locked <0xbbb608f8> (a 
org.apache.camel.spring.SpringCamelContext)
.....
***********************************

Any idea whats going wrong?

Thank you,
Kind regards,
Thomas



InterComponentWare AG:  
Vorstand: Peter Kirschbauer (Vors.), Matthias Glück  
Aufsichtsratsvors.: Prof. Dr. Christof Hettich  
Unternehmenssitz: 69190 Walldorf, Altrottstraße 31  
AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516

Reply via email to