Details
Description
We use the verify goal of the karaf-maven-plugin to verify 200+ features in our openHAB add-ons build (see pom.xml).
When monitoring the build using VisualVM the live thread counts keep increasing each time the verify goal is executed.
It increases to ~2000 threads after invoking the goal 200+ times:
When the plugin is removed from the build everything returns to normal (this was a full build with tests):
To reproduce it on our code:
- git clone -b 2.5.x --single-branch git@github.com:openhab/openhab-addons.git
- cd openhab-addons
- mvn clean install -DskipChecks -DskipTests
- Monitor the live thread counts using a tool like VisualVM
When re-running the same build without Karaf feature validation, VisualVM will show that the live thread counts peak at 20 instead:
- mvn clean install -DskipChecks -DskipTests -Dfeatures.verify.skip=true
I also tested the 4.2.8 version of the plugin but it was still leaking threads.