Details
-
Bug
-
Status: Resolved (View Workflow)
-
Blocker
-
Resolution: Fixed
-
None
-
Jenkins 2.134
mqtt-notification-plugin 1.7
-
-
mqtt-notification-plugin 1.8.0
Description
We observed unexplainable OutOfMemoryExceptions in arbitratry places around Jenkins. After some investigation with Jconsole, we noticed, what seems to be a memory leak. The thread overview shows a very high number of unclosed MQTT related threads. We therefore assume MQTT threads are created but never closed?
Security Breach
After investigating the source code:
The mqtt client must be closed in a finally block in both: the perform() method and the doTestConnection() method. Doing this resolves the problem in our local environment.
With the next release MqttClient will implement AutoClosable, which should help resolve this even cleaner.
https://github.com/eclipse/paho.mqtt.java/pull/448