You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by GitBox <gi...@apache.org> on 2022/11/03 23:06:54 UTC

[GitHub] [karaf] wborn opened a new pull request, #1678: [KARAF-6697] Fix threads leak in karaf-maven-plugin verify goal

wborn opened a new pull request, #1678:
URL: https://github.com/apache/karaf/pull/1678

   Since we now verify ~400 features in the openHAB Addons repo, the number of threads being leaked by the verify goal causes GitHub Actions builds to run out of memory.
   
   I did some investigation and found that the thread leak is caused by the VerifyMojo itself.
   For some reason the threads created by the executor are never garbage collected.
   
   ---
   
   The goal leaks 8 threads each time it is executed. So if you verify 400 features in a build it causes 3200 threads to be leaked:
   
   ![before](https://user-images.githubusercontent.com/12213581/199851563-751c3ad6-d9ec-49c0-9560-1d1bcb54749d.png)
   
   ---
   
   When the executor is shutdown the verify goal no longer leaks threads. :slightly_smiling_face: 
   
   ![after](https://user-images.githubusercontent.com/12213581/199851572-bac84c95-8b94-4014-95b8-d36b9de44316.png)
   
   ---
   
   It would also be nice when the fix is cherry-picked to 4.3.x.


-- 
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: commits-unsubscribe@karaf.apache.org

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


[GitHub] [karaf] wborn commented on a diff in pull request #1678: [KARAF-6697] Fix threads leak in karaf-maven-plugin verify goal

Posted by GitBox <gi...@apache.org>.
wborn commented on code in PR #1678:
URL: https://github.com/apache/karaf/pull/1678#discussion_r1013474904


##########
tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/VerifyMojo.java:
##########
@@ -48,8 +48,6 @@
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.BiFunction;
-import java.util.function.Function;
-import java.util.function.Supplier;

Review Comment:
   These are unused imports.



-- 
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: commits-unsubscribe@karaf.apache.org

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


[GitHub] [karaf] jbonofre merged pull request #1678: [KARAF-6697] Fix threads leak in karaf-maven-plugin verify goal

Posted by GitBox <gi...@apache.org>.
jbonofre merged PR #1678:
URL: https://github.com/apache/karaf/pull/1678


-- 
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: commits-unsubscribe@karaf.apache.org

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