You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Dignesh <dg...@opentext.com> on 2016/10/06 04:12:31 UTC

7.0.1 TomEE plus shutdown fails intermetantly

Hi,

When I invoke shutdown.bat , TomEE server doesnot stop. It is getting struck
at some point. I need to kill the java process manually everytime.
Can anyone please help me why I am seeing this issue.Attached the screen
shot of the log where it is getting struck
TestLog.jpg
<http://tomee-openejb.979440.n4.nabble.com/file/n4680299/TestLog.jpg>  

Thank you,
Dignesh



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/7-0-1-TomEE-plus-shutdown-fails-intermetantly-tp4680299.html
Sent from the TomEE Dev mailing list archive at Nabble.com.

Re: 7.0.1 TomEE plus shutdown fails intermetantly

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2016-10-06 12:03 GMT+02:00 Dignesh <dg...@opentext.com>:

> Hi Romain,
>
> Just curious to know ..how you found it is thread-42 from screenshot ?
>
>
First WARNING ;)


>
> Attached are the thread dump and latest screen shot of shutdown getting
> blocked. ThreadDump.txt
> <http://tomee-openejb.979440.n4.nabble.com/file/n4680301/ThreadDump.txt>
> issue.jpg
> <http://tomee-openejb.979440.n4.nabble.com/file/n4680301/issue.jpg>
>
>
The issue comes from this thread:



"pool-18-thread-1" prio=6 tid=0x0000000012917000 nid=0xfdc waiting on
condition [0x0000000014e1f000]
   java.lang.Thread.State: TIMED_WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x000000071563d248> (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:2082)
        at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1090)
        at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:807)
        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)


(found with this command

grep '^"' /tmp/ThreadDump.txt  | grep -v daemon | grep -v main | grep
-v GC | grep -v VM
"pool-18-thread-1" prio=6 tid=0x0000000012917000 nid=0xfdc waiting on
condition [0x0000000014e1f000]

)


But I'm not sure who is created the pool. One easy way is to debug in
ThreadPoolExecutor constructor to know ho creates this pool.

Thank you,
> Dignesh,
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/7-0-1-TomEE-plus-shutdown-fails-intermetantly-
> tp4680299p4680301.html
> Sent from the TomEE Dev mailing list archive at Nabble.com.
>

Re: 7.0.1 TomEE plus shutdown fails intermetantly

Posted by Dignesh <dg...@opentext.com>.
Hi Romain,

Just curious to know ..how you found it is thread-42 from screenshot ?


Attached are the thread dump and latest screen shot of shutdown getting
blocked. ThreadDump.txt
<http://tomee-openejb.979440.n4.nabble.com/file/n4680301/ThreadDump.txt>  
issue.jpg
<http://tomee-openejb.979440.n4.nabble.com/file/n4680301/issue.jpg>  

Thank you,
Dignesh,



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/7-0-1-TomEE-plus-shutdown-fails-intermetantly-tp4680299p4680301.html
Sent from the TomEE Dev mailing list archive at Nabble.com.

Re: 7.0.1 TomEE plus shutdown fails intermetantly

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi Dignesh,

this is due to not daemon threads not stopped at shutdown.

This Thread-42 is very suspicious

To know what happens just take a thread dump (jps -> identify Bootstrap
process pid then jstack <pid>)


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-10-06 6:12 GMT+02:00 Dignesh <dg...@opentext.com>:

> Hi,
>
> When I invoke shutdown.bat , TomEE server doesnot stop. It is getting
> struck
> at some point. I need to kill the java process manually everytime.
> Can anyone please help me why I am seeing this issue.Attached the screen
> shot of the log where it is getting struck
> TestLog.jpg
> <http://tomee-openejb.979440.n4.nabble.com/file/n4680299/TestLog.jpg>
>
> Thank you,
> Dignesh
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/7-0-1-TomEE-plus-shutdown-fails-intermetantly-tp4680299.html
> Sent from the TomEE Dev mailing list archive at Nabble.com.
>