You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bjørn Ellingsen (JIRA)" <ji...@apache.org> on 2014/12/11 14:15:13 UTC
[jira] [Created] (CAMEL-8146) Starting and stopping routes leak
threads
Bjørn Ellingsen created CAMEL-8146:
--------------------------------------
Summary: Starting and stopping routes leak threads
Key: CAMEL-8146
URL: https://issues.apache.org/jira/browse/CAMEL-8146
Project: Camel
Issue Type: Bug
Affects Versions: 2.14.0
Reporter: Bjørn Ellingsen
Priority: Minor
Fix For: 2.14.1
Seems to be identical consequence as with previous issue CAMEL-5677, but perhaps due to a different cause.
Having a file or SFTP based route, trying something like:
{code}
for (int i = 0; i < 50; i++) {
camelContext.startRoute(routeId);
camelContext.stopRoute(routeId);
}
{code}
results in 50 orphan threads of this type:
{code}
"Camel (camel) thread #231 - sftp://user@host/path" #10170 daemon prio=5 os_prio=0 tid=0x00007fa4b46a5800 nid=0x10fc waiting on condition [0x00007fa452934000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000b83dc900> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
{code}
Switching to suspend/resume solves the problem, however I guess the start/stop issue should be addressed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)