Tapan Jaggi created AMQ-5215:
--------------------------------
Summary: org.apache.activemq.thread.PooledTaskRunner.wakeup()
doesn't handle errors
Key: AMQ-5215
URL: https://issues.apache.org/jira/browse/AMQ-5215
Project: ActiveMQ
Issue Type: Improvement
Components: activemq-pool
Affects Versions: 5.x
Environment: SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3
Reporter: Tapan Jaggi
Priority: Critical
Fix For: NEEDS_REVIEW
We were getting below error in logs only once, but once this error comes
OnMessage was not getting called in my listener class. We found that in
org.apache.activemq.thread.PooledTaskRunner.wakeup() , if some Error is thrown
on line "executor.execute(runable)", like the one below, no further messages
will be processed by the PooledTaskRunner.wakeup() since the flag queued will
be set to true and
if (queued || shutdown) {
return;
}
will make any future call to be returned without being processed.
14:26:04,676 ERROR [stderr] (ActiveMQ Session Task-14) Exception in thread
"ActiveMQ Session Task-14" java.lang.OutOfMemoryError: unable to create new
native thread
14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at
java.lang.Thread.start0(Native Method)
14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at
java.lang.Thread.start(Thread.java:691)
14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:943)
14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at
java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:992)
14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
14:26:04,677 ERROR [stderr] (ActiveMQ Session Task-14) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
14:26:04,678 ERROR [stderr] (ActiveMQ Session Task-14) at
java.lang.Thread.run(Thread.java:722)
The issue can be reproduced by injecting java.lang.Error after line queued =
true is executed.
--
This message was sent by Atlassian JIRA
(v6.2#6252)