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

Possible memory leak

    XMLWordPrintable

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

      Attachments

        Activity

          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

          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

          Thanks for reporting the issue and doing the analysis up_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 added a comment - Thanks for reporting the issue and doing the analysis up_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).

          People

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

            Dates

              Created:
              Updated:
              Resolved: