You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "KON-SUN-TACK (Jira)" <ji...@apache.org> on 2023/03/02 15:09:00 UTC

[jira] [Updated] (WW-5289) Execute and Wait Interceptor prevents JVM shutdown

     [ https://issues.apache.org/jira/browse/WW-5289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

KON-SUN-TACK updated WW-5289:
-----------------------------
    Description: 
Hi Struts 2 team,

We are using the Execute and Wait Interceptor as following:

{quote}    <action name="longRunLaunch"
           class="my.sample.longrun.action.LongRunAction"
          method="longRunLaunch">
      <interceptor-ref name="myStack"/>
      <interceptor-ref name="execAndWait">
        <param name="delay">500</param>
        <param name="delaySleepInterval">500</param>
      </interceptor-ref>
      <result name="wait">/my/sample/wait.jsp</result>
      <result name="success">/my/sample/success.jsp</result>
    </action>{quote}

- with Struts 6.0.3, it works fine
- with Struts 6.1.1, it works fine... but JVM shutdown is hanging

We are running: Apache Tomcat (TomEE)/9.0.41 (8.0.6)

I tried to compare thread dumps and only found this extra one with Struts 6.1.1:

{quote}"pool-5-thread-1" #129 prio=5 os_prio=0 cpu=0.00ms elapsed=21.47s tid=0x000001b39a917800 nid=0x3cb0 waiting on condition  [0x00000068c4fff000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.10/Native Method)
        - parking to wait for  <0x00000000e4ca75b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.10/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.10/AbstractQueuedSynchronizer.java:2081)
        at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.10/LinkedBlockingQueue.java:433)
        at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.10/ThreadPoolExecutor.java:1054)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.10/ThreadPoolExecutor.java:1114)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.10/ThreadPoolExecutor.java:628)
        at java.lang.Thread.run(java.base@11.0.10/Thread.java:834)

   Locked ownable synchronizers:
        - None{quote}


Regards,
Jean.

  was:
Hi Struts 2 team,

We are using the Execute and Wait Interceptor as following:

{{    <action name="longRunLaunch"
           class="my.sample.longrun.action.LongRunAction"
          method="longRunLaunch">
      <interceptor-ref name="myStack"/>
      <interceptor-ref name="execAndWait">
        <param name="delay">500</param>
        <param name="delaySleepInterval">500</param>
      </interceptor-ref>
      <result name="wait">/my/sample/wait.jsp</result>
      <result name="success">/my/sample/success.jsp</result>
    </action>}}

- with Struts 6.0.3, it works fine
- with Struts 6.1.1, it works fine... but JVM shutdown is hanging

We are running: Apache Tomcat (TomEE)/9.0.41 (8.0.6)

I tried to compare thread dumps and only found this extra one with Struts 6.1.1:

{{"pool-5-thread-1" #129 prio=5 os_prio=0 cpu=0.00ms elapsed=21.47s tid=0x000001b39a917800 nid=0x3cb0 waiting on condition  [0x00000068c4fff000]
   java.lang.Thread.State: WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@11.0.10/Native Method)
        - parking to wait for  <0x00000000e4ca75b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(java.base@11.0.10/LockSupport.java:194)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.10/AbstractQueuedSynchronizer.java:2081)
        at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.10/LinkedBlockingQueue.java:433)
        at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.10/ThreadPoolExecutor.java:1054)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.10/ThreadPoolExecutor.java:1114)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.10/ThreadPoolExecutor.java:628)
        at java.lang.Thread.run(java.base@11.0.10/Thread.java:834)

   Locked ownable synchronizers:
        - None}}


Regards,
Jean.


> Execute and Wait Interceptor prevents JVM shutdown
> --------------------------------------------------
>
>                 Key: WW-5289
>                 URL: https://issues.apache.org/jira/browse/WW-5289
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 6.1.1
>            Reporter: KON-SUN-TACK
>            Priority: Major
>
> Hi Struts 2 team,
> We are using the Execute and Wait Interceptor as following:
> {quote}    <action name="longRunLaunch"
>            class="my.sample.longrun.action.LongRunAction"
>           method="longRunLaunch">
>       <interceptor-ref name="myStack"/>
>       <interceptor-ref name="execAndWait">
>         <param name="delay">500</param>
>         <param name="delaySleepInterval">500</param>
>       </interceptor-ref>
>       <result name="wait">/my/sample/wait.jsp</result>
>       <result name="success">/my/sample/success.jsp</result>
>     </action>{quote}
> - with Struts 6.0.3, it works fine
> - with Struts 6.1.1, it works fine... but JVM shutdown is hanging
> We are running: Apache Tomcat (TomEE)/9.0.41 (8.0.6)
> I tried to compare thread dumps and only found this extra one with Struts 6.1.1:
> {quote}"pool-5-thread-1" #129 prio=5 os_prio=0 cpu=0.00ms elapsed=21.47s tid=0x000001b39a917800 nid=0x3cb0 waiting on condition  [0x00000068c4fff000]
>    java.lang.Thread.State: WAITING (parking)
>         at jdk.internal.misc.Unsafe.park(java.base@11.0.10/Native Method)
>         - parking to wait for  <0x00000000e4ca75b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>         at java.util.concurrent.locks.LockSupport.park(java.base@11.0.10/LockSupport.java:194)
>         at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(java.base@11.0.10/AbstractQueuedSynchronizer.java:2081)
>         at java.util.concurrent.LinkedBlockingQueue.take(java.base@11.0.10/LinkedBlockingQueue.java:433)
>         at java.util.concurrent.ThreadPoolExecutor.getTask(java.base@11.0.10/ThreadPoolExecutor.java:1054)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(java.base@11.0.10/ThreadPoolExecutor.java:1114)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(java.base@11.0.10/ThreadPoolExecutor.java:628)
>         at java.lang.Thread.run(java.base@11.0.10/Thread.java:834)
>    Locked ownable synchronizers:
>         - None{quote}
> Regards,
> Jean.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)