You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org> on 2011/02/08 17:50:04 UTC

[jira] Created: (UIMA-2038) UIMA AS process does not terminate reliably

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


UIMA AS two stop options dont seem to work reliably. Neither 's' and '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

        

Re: [jira] Commented: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
Hmm it seems that I need to add spring-aop-3.0.3.RELEASE.jar.

JC

2011/2/21 Jörn Kottmann (JIRA) <de...@uima.apache.org>

>
>    [
> https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997439#comment-12997439]
>
> Jörn Kottmann commented on UIMA-2038:
> -------------------------------------
>
> Now I tested it on my test system. I put the new jars of a freshly compiled
> 2.3.1 trunk onto my test system.
>
> When pressing "q" I get the following exception:
>
> 2/21/11 3:57:52 PM - 10:
> org.apache.uima.aae.controller.PrimitiveAnalysisEngineController_impl.stop:
> INFO: Controller: SearchEngine has stopped
> Exception in thread "main" java.lang.reflect.InvocationTargetException
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:616)
>        at
> org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:98)
> Caused by: java.lang.NoClassDefFoundError:
> org/springframework/aop/support/AopUtils
>        at
> org.springframework.context.event.GenericApplicationListenerAdapter.supportsEventType(GenericApplicationListenerAdapter.java:57)
>        at
> org.springframework.context.event.AbstractApplicationEventMulticaster.supportsEvent(AbstractApplicationEventMulticaster.java:179)
>        at
> org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:140)
>        at
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:86)
>        at
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
>        at
> org.springframework.context.support.AbstractApplicationContext.stop(AbstractApplicationContext.java:1242)
>        at
> org.apache.uima.adapter.jms.activemq.SpringContainerDeployer.undeploy(SpringContainerDeployer.java:493)
>        at
> org.apache.uima.adapter.jms.service.UIMA_Service.main(UIMA_Service.java:422)
>        ... 5 more
> Caused by: java.lang.ClassNotFoundException:
> org.springframework.aop.support.AopUtils
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>        ... 13 more
>
> It looks like I am just missing some spring jar file, didn't you get this
> error? I checked the distribution produced on the trunk version but could
> not see an additional or updated jar file, but maybe I missed something.
>
> > 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
>
>
>

Re: [jira] Commented: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by Jörn Kottmann <ko...@gmail.com>.
On 3/1/11 5:54 PM, Jaroslaw Cwiklik wrote:
> Not sure I fully understand the scenario. Quiesce and stop waits until all
> CASes are processed and only then it proceeds to stop the service. Perhaps
> the scenario you are describing exposes a bug in the UIMA AS. Can you
> describe the scenario in more detail? Are you sending CASes to the service
> while trying to quit the service? Is the Cas Multiplier producing CASes
> while the service is being stopped?

Yes I am sending CASes to the service which are then processed, through
a bug in one of my AEs I got many exceptions thrown randomly.
I then noticed that stopping with kill pid does not seem to work.
In this AAE is no Cas Multiplier.
I tested it again now and it works correctly.

I noticed that this is only be written to the console:
"Uima AS Service Wrapper Caught Kill Signal - Initiating Quiesce and Stop"

Shouldn't that be logged instead?

Jörn


Re: [jira] Commented: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
Not sure I fully understand the scenario. Quiesce and stop waits until all
CASes are processed and only then it proceeds to stop the service. Perhaps
the scenario you are describing exposes a bug in the UIMA AS. Can you
describe the scenario in more detail? Are you sending CASes to the service
while trying to quit the service? Is the Cas Multiplier producing CASes
while the service is being stopped?

JC


On Tue, Mar 1, 2011 at 11:39 AM, Jörn Kottmann <ko...@gmail.com> wrote:

> On 3/1/11 5:29 PM, Jaroslaw Cwiklik wrote:
>
>> Well, I would like to wait a little while longer to give others a chance
>> to
>> comment on RC5. Go ahead with the PID modification. As I recall this is
>> about formatting only. Seems like a tough one :)
>>
>
> I might found one more problem related to this issue with RC5.
>
> I noticed that a simple kill does not work when an AE is constantly
> throwing a RuntimeException
> for many of its processed CASes. As far as I understand the kill triggers
> the shutdown hook which
> does the quiesce. So even when there are exceptions from the process method
> it should be
> possible to quiesce the service.
>
> I will investigate that tomorrow with my now deployed snapshot version.
>
> Jörn
>

Re: [jira] Commented: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by Jörn Kottmann <ko...@gmail.com>.
On 3/1/11 5:29 PM, Jaroslaw Cwiklik wrote:
> Well, I would like to wait a little while longer to give others a chance to
> comment on RC5. Go ahead with the PID modification. As I recall this is
> about formatting only. Seems like a tough one :)

I might found one more problem related to this issue with RC5.

I noticed that a simple kill does not work when an AE is constantly 
throwing a RuntimeException
for many of its processed CASes. As far as I understand the kill 
triggers the shutdown hook which
does the quiesce. So even when there are exceptions from the process 
method it should be
possible to quiesce the service.

I will investigate that tomorrow with my now deployed snapshot version.

Jörn

Re: [jira] Commented: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
Well, I would like to wait a little while longer to give others a chance to
comment on RC5. Go ahead with the PID modification. As I recall this is
about formatting only. Seems like a tough one :)

JC


On Tue, Mar 1, 2011 at 11:25 AM, Jörn Kottmann <ko...@gmail.com> wrote:

> On 3/1/11 5:05 PM, Jaroslaw Cwiklik wrote:
>
>> Jorn, I just committed a few changes. These should fix the hang yu've
>> reported. If it works close the JIRA
>> Thanks, JC
>>
>
> Works now, I already closed the issue. Do you make a new RC?
> If so please drop me a note before, would still like to modify the PID
> log message on start up.
>
> Jörn
>

Re: [jira] Commented: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by Jörn Kottmann <ko...@gmail.com>.
On 3/1/11 5:05 PM, Jaroslaw Cwiklik wrote:
> Jorn, I just committed a few changes. These should fix the hang yu've
> reported. If it works close the JIRA
> Thanks, JC

Works now, I already closed the issue. Do you make a new RC?
If so please drop me a note before, would still like to modify the PID
log message on start up.

Jörn

Re: [jira] Commented: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
Jorn, I just committed a few changes. These should fix the hang yu've
reported. If it works close the JIRA
Thanks, JC


2011/3/1 Jörn Kottmann (JIRA) <de...@uima.apache.org>

>
>    [
> https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000800#comment-13000800]
>
> Jörn Kottmann commented on UIMA-2038:
> -------------------------------------
>
> Now re-tested with 2.3.1 RC5 and the issue remains. After processing a few
> CASes the process does not stop when terminated with "q".
>
> Here are the non-daemon jstack threads:
>
>
> "DestroyJavaVM" prio=10 tid=0x00007f24ec2b4000 nid=0x370d waiting on
> condition [0x0000000000000000]
>   java.lang.Thread.State: RUNNABLE
>
> "VmThreadGroup563b24df:12e70c47767:-7ff2_SolrcasAE:Reaper" prio=10
> tid=0x00007f24ec2b5000 nid=0x395f in Object.wait() [0x00007f24ea9cf000]
>   java.lang.Thread.State: TIMED_WAITING (on object monitor)
>        at java.lang.Object.wait(Native Method)
>        - waiting on <0x00007f251e611b00> (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 <0x00007f251e611b00> (a
> org.apache.uima.aae.spi.transport.vm.VmTransport$1)
>
> I guess the second thread as a UIMA-AS thread which maybe should be daemon
> or terminated
> in some way.
>
>
> > 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
>
>
>

[jira] Commented: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ 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

       

[jira] Reopened: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Cwiklik reopened UIMA-2038:
---------------------------------


Not all listener threads shutdown causing a memory leak while running extended tests. 

> 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

        

[jira] Commented: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12997439#comment-12997439 ] 

Jörn Kottmann commented on UIMA-2038:
-------------------------------------

Now I tested it on my test system. I put the new jars of a freshly compiled 2.3.1 trunk onto my test system.

When pressing "q" I get the following exception:

2/21/11 3:57:52 PM - 10: org.apache.uima.aae.controller.PrimitiveAnalysisEngineController_impl.stop: INFO: Controller: SearchEngine has stopped
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:98)
Caused by: java.lang.NoClassDefFoundError: org/springframework/aop/support/AopUtils
	at org.springframework.context.event.GenericApplicationListenerAdapter.supportsEventType(GenericApplicationListenerAdapter.java:57)
	at org.springframework.context.event.AbstractApplicationEventMulticaster.supportsEvent(AbstractApplicationEventMulticaster.java:179)
	at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:140)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:86)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
	at org.springframework.context.support.AbstractApplicationContext.stop(AbstractApplicationContext.java:1242)
	at org.apache.uima.adapter.jms.activemq.SpringContainerDeployer.undeploy(SpringContainerDeployer.java:493)
	at org.apache.uima.adapter.jms.service.UIMA_Service.main(UIMA_Service.java:422)
	... 5 more
Caused by: java.lang.ClassNotFoundException: org.springframework.aop.support.AopUtils
	at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
	... 13 more

It looks like I am just missing some spring jar file, didn't you get this error? I checked the distribution produced on the trunk version but could not see an additional or updated jar file, but maybe I missed something.

> 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

       

[jira] Reopened: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Cwiklik reopened UIMA-2038:
---------------------------------


In extended test setup, stop and start broker between tests to provide better isolation. 

> 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

        

[jira] Commented: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993132#comment-12993132 ] 

Jörn Kottmann commented on UIMA-2038:
-------------------------------------

I will try it on my test systems and report back here.

> 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

       

[jira] Closed: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann closed UIMA-2038.
-------------------------------

    Resolution: Fixed

Tested as request by Jerry and the issue is now fixed on my test system.

> 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

       

[jira] Closed: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Cwiklik closed UIMA-2038.
-------------------------------

    Resolution: Fixed

Modified listener's destroy method to call spring's listeners shutdown() method

> 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

        

[jira] Commented: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
    [ https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13000800#comment-13000800 ] 

Jörn Kottmann commented on UIMA-2038:
-------------------------------------

Now re-tested with 2.3.1 RC5 and the issue remains. After processing a few CASes the process does not stop when terminated with "q".

Here are the non-daemon jstack threads:


"DestroyJavaVM" prio=10 tid=0x00007f24ec2b4000 nid=0x370d waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"VmThreadGroup563b24df:12e70c47767:-7ff2_SolrcasAE:Reaper" prio=10 tid=0x00007f24ec2b5000 nid=0x395f in Object.wait() [0x00007f24ea9cf000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00007f251e611b00> (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 <0x00007f251e611b00> (a org.apache.uima.aae.spi.transport.vm.VmTransport$1)

I guess the second thread as a UIMA-AS thread which maybe should be daemon or terminated
in some way.


> 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

       

[jira] Closed: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Cwiklik closed UIMA-2038.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.1AS

Modified to support orderly shutdown. Major improvements: all uima as threads (in thread pools) are daemon threads, the service closes the connection to the broker before it exits. 

> 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

        

[jira] Reopened: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by "Jörn Kottmann (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörn Kottmann reopened UIMA-2038:
---------------------------------


> 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

       

[jira] Closed: (UIMA-2038) UIMA AS process does not terminate reliably

Posted by "Jerry Cwiklik (JIRA)" <de...@uima.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-2038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jerry Cwiklik closed UIMA-2038.
-------------------------------

    Resolution: Fixed

Modified extended tests to start and stop broker for each test

> 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