[
https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998316#comment-12998316
]
Jörn Kottmann commented on UIMA-2038:
-------------------------------------
OK, now redeployed it to my test system, it seems to shutdown when pressing "q"
directly after it started up and did not do any work. When I now start my small
uima-as driver and shut it down under load it stays alive.
I again used jstack to find non-daemon threads:
"VmThreadGroup65921d50:12e523d4ede:-7ff2_SolrcasAE:Reaper" prio=10
tid=0x00007f7d4c0e7800 nid=0x68f8 in Object.wait() [0x00007f7d4bffe000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00007f7d80547d10> (a
org.apache.uima.aae.spi.transport.vm.VmTransport$1)
at
org.apache.uima.aae.spi.transport.vm.VmTransport$1.run(VmTransport.java:150)
- locked <0x00007f7d80547d10> (a
org.apache.uima.aae.spi.transport.vm.VmTransport$1)
"threadGroupDestroyer" prio=10 tid=0x00007f7d4c3ac000 nid=0x684d waiting on
condition [0x00007f7d503ea000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00007f7d625662e0> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2081)
at
java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1425)
at
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.shutdownTaskExecutor(UimaDefaultMessageListenerContainer.java:912)
at
org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer$3.run(UimaDefaultMessageListenerContainer.java:942)
"ActiveMQ Transport: tcp://xxx.net/127.0.0.2:61616" prio=10
tid=0x00007f7d4c160800 nid=0x67dd runnable [0x00007f7d50ff6000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:146)
at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
at
org.apache.activemq.transport.tcp.TcpTransport$2.fill(TcpTransport.java:575)
at
org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
at
org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:560)
at java.io.DataInputStream.readInt(DataInputStream.java:387)
at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269)
at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:226)
at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:218)
at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:201)
at java.lang.Thread.run(Thread.java:636)
In the activemq console I can see that one of the two consumers is still
connected.
> UIMA AS process does not terminate reliably
> -------------------------------------------
>
> Key: UIMA-2038
> URL: https://issues.apache.org/jira/browse/UIMA-2038
> Project: UIMA
> Issue Type: Bug
> Components: Async Scaleout
> Affects Versions: 2.3.1AS
> Reporter: Jerry Cwiklik
> Assignee: Jerry Cwiklik
> Fix For: 2.3.1AS
>
>
> UIMA AS two stop options dont seem to work reliably. Neither 's' nor 'q' on
> the command line force a clean shutdown of the process. Actually, there is
> also a related problem. Namely, when the shutdown succeeds it appears that
> the Shared Connection that all Spring listeners use is not closed which leads
> to an ugly exception on the broker console. This happens every time the
> service is terminated. Review listeners shutdown code and make sure that when
> the last listener terminates the connection is stopped before the process
> exits. Also, make sure that uima threads from custom pools are daemon threads
> to allow the jvm to collect them on shutdown. NOTE: AMQ version 4.x internal
> threads are not daemon threads and there is special code in the listener to
> wait for them to stop before exiting. Newer AMQ version use daemon threads so
> shutting down AMQ is much more reliable.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira