peacewong opened a new issue #1765:
URL: https://github.com/apache/incubator-linkis/issues/1765


   ### Search before asking
   
   - [X] I searched the 
[issues](https://github.com/apache/incubator-linkis/issues) and found no 
similar issues.
   
   
   ### Linkis Component
   
   linkis-cg-engineConnplugin
   
   ### What happened + What you expected to happen
   
   EC tryShutdown has a blocking problem. When the task is running and triggers 
shutdown, it will block. The jstack log is as follows:
   EC tryShutdown 会存在阻塞问题,当又任务正在运行触发shutdown时会阻塞,jstack日志如下:
   ```
   SpringContextShutdownHook" #28 prio=5 os_prio=0 tid=0x00007fc16402c800 
nid=0x789e waiting for monitor entry [0x00007fc1ed5e0000]
      java.lang.Thread.State: BLOCKED (on object monitor)
           at 
org.apache.linkis.engineconn.executor.entity.SensibleExecutor$class.transition(SensibleExecutor.scala:36)
           - waiting to lock <0x00000000c19bf838> (a 
org.apache.linkis.manager.engineplugin.python.executor.PythonEngineConnExecutor)
           at 
org.apache.linkis.engineconn.acessible.executor.entity.AccessibleExecutor.transition(AccessibleExecutor.scala:27)
           at 
org.apache.linkis.engineconn.computation.executor.execute.ComputationExecutor.tryShutdown(ComputationExecutor.scala:97)
           at 
org.apache.linkis.engineconn.acessible.executor.service.DefaultAccessibleService$$anonfun$executorShutDownHook$1.apply$mcZ$sp(DefaultAccessibleService.scala:83)
           at 
org.apache.linkis.engineconn.acessible.executor.service.DefaultAccessibleService$$anonfun$executorShutDownHook$1.apply(DefaultAccessibleService.scala:83)
           at 
org.apache.linkis.engineconn.acessible.executor.service.DefaultAccessibleService$$anonfun$executorShutDownHook$1.apply(DefaultAccessibleService.scala:83)
           at org.apache.linkis.common.utils.Utils$.tryCatch(Utils.scala:40)
           at org.apache.linkis.common.utils.Utils$.tryAndWarn(Utils.scala:69)
           at 
org.apache.linkis.engineconn.acessible.executor.service.DefaultAccessibleService.executorShutDownHook(DefaultAccessibleService.scala:82)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at 
org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:305)
           at 
org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:190)
           at 
org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:153)
           at 
org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
           at 
org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
           at 
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
           at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404)
           at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361)
           at 
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1013)
           at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:170)
           at 
org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:949)
           - locked <0x00000000c0aef2f0> (a java.lang.Object)
   ```
   
   ### Relevent platform
   
   all
   
   ### Reproduction script
   
   no
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@linkis.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@linkis.apache.org
For additional commands, e-mail: dev-h...@linkis.apache.org

Reply via email to