You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "TeslaCN (via GitHub)" <gi...@apache.org> on 2023/06/08 09:07:17 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue, #26195: Probably threads leakage occurs in org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine

TeslaCN opened a new issue, #26195:
URL: https://github.com/apache/shardingsphere/issues/26195

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   master - c442a7fa89451dd1728851ed71575e01efe805a4
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   Pipeline
   
   ### Expected behavior
   
   No active thread after ExecuteEngine was garbage collected.
   
   ### Actual behavior
   
   There was no alive ExecuteEngine instance, but there were many alive pipeline threads.
   
   ![image](https://github.com/apache/shardingsphere/assets/20503072/e6a2f2be-b97d-40a0-aa0d-21ac54a084bd)
   
   ![image](https://github.com/apache/shardingsphere/assets/20503072/9e33c419-0597-499f-b53e-bf720e4c1dfa)
   
   
   ### Reason analyze (If you can)
   
   ExecuteEngine instances created in `org.apache.shardingsphere.data.pipeline.core.context.AbstractInventoryIncrementalProcessContext` were not shutdown.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] TeslaCN commented on issue #26195: Probably threads leakage occurs in org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine

Posted by "TeslaCN (via GitHub)" <gi...@apache.org>.
TeslaCN commented on issue #26195:
URL: https://github.com/apache/shardingsphere/issues/26195#issuecomment-1582202413

   
   > When I verified it before, thread pool will be closed on GC after job execution completed. We could try to close thread pool manually.
   > 
   > Is job in screenshot stopped?
   
   Pipeline threads are idle and alive.
   
   ![image](https://github.com/apache/shardingsphere/assets/20503072/33d64f56-cf6a-47c1-b829-2e5e88307cbd)
   
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] azexcy closed issue #26195: Probably threads leakage occurs in org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine

Posted by "azexcy (via GitHub)" <gi...@apache.org>.
azexcy closed issue #26195: Probably threads leakage occurs in org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine
URL: https://github.com/apache/shardingsphere/issues/26195


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] sandynz commented on issue #26195: Probably threads leakage occurs in org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine

Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on issue #26195:
URL: https://github.com/apache/shardingsphere/issues/26195#issuecomment-1582434393

   I tested migration again on local JDK 11. `Executors.newFixedThreadPool` is used for some thread pool.
   - There's no pipeline threads any more after migration job stopping in `IDEA Thread Dump`.
   - But there's pipeline threads (idle thread of executor service) in `jstack` result. Though [thread pool]( https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ThreadPoolExecutor.html ) may be reclaimed on GC, it's not guaranteed.
   
   So you're right. It's better to close related thread pool explicitly.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] sandynz commented on issue #26195: Probably threads leakage occurs in org.apache.shardingsphere.data.pipeline.core.execute.ExecuteEngine

Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz commented on issue #26195:
URL: https://github.com/apache/shardingsphere/issues/26195#issuecomment-1582196194

   When I verified it before, thread pool will be closed on GC after job execution completed.
   We could try to close thread pool manually.
   
   Is job in screenshot stopped?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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