Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52767

Possible memory leak

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • 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

          up_lange Urs Lange created issue -
          up_lange Urs Lange made changes -
          Field Original Value New Value
          Priority Minor [ 4 ] Blocker [ 1 ]
          Hide
          up_lange Urs Lange added a comment - - edited

          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

          Show
          up_lange Urs Lange added a comment - - edited 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
          gareth_western Gareth Western made changes -
          Assignee Gareth Western [ gareth_western ]
          Hide
          gareth_western Gareth Western added a comment -

          Thanks for reporting the issue and doing the analysis Urs Lange! i completely forgot about this issue, but a recent PR has fixed it so i'll get a new version released soon (though i guess it's probably too late in your case).

          Show
          gareth_western Gareth Western added a comment - Thanks for reporting the issue and doing the analysis Urs Lange ! i completely forgot about this issue, but a recent PR has fixed it so i'll get a new version released soon (though i guess it's probably too late in your case).
          gareth_western Gareth Western made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          morpheus3231 Morpheus Zeus made changes -
          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
          gareth_western Gareth Western made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          gareth_western Gareth Western made changes -
          Released As mqtt-notification-plugin 1.8.0
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Resolved [ 5 ]

            People

            Assignee:
            gareth_western Gareth Western
            Reporter:
            up_lange Urs Lange
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: