Details
-
Type:
Bug
-
Status: Resolved (View Workflow)
-
Priority:
Blocker
-
Resolution: Fixed
-
Component/s: mqtt-notification-plugin
-
Labels:None
-
Environment:Jenkins 2.134
mqtt-notification-plugin 1.7
-
Similar Issues:
-
Released As: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
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Priority | Minor [ 4 ] | Blocker [ 1 ] |
Assignee | Gareth Western [ gareth_western ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
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? |
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 |
Status | In Progress [ 3 ] | In Review [ 10005 ] |
Released As | mqtt-notification-plugin 1.8.0 | |
Resolution | Fixed [ 1 ] | |
Status | In Review [ 10005 ] | Resolved [ 5 ] |
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