• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • core
    • Jenkins 2.401.2 - stapler web framework!

      Jenkins is running in 2.401.2 version. Intermittently this Jenkins application was throwing java.lang.OutOfMemoryError. We captured the heap dump from the Jenkins and analyzed it through yCrash's HeapHero tool. Below is the summary of the findings pointed out by the HeapHero tool: 

      1. Tool reported two problem suspects. Problem Suspect 1 was a thread's local variable occupying 56.73% of memory. Problem Suspect 2 was another thread's local variable occupying 27.62% of memory. (Please see the attachment)
      2. Largest Object section of the Heap dump analysis report (please see the attachment). You can notice that thread has a local variable of type 'org.kohuske.stapler.export.Property$BufferedDataWriter'. This variable alone is occupying 3.36GB of data.

      Apparently 'org.kohuske.stapler.export.Property$BufferedDataWriter' internally contains an ArrayList' which has several millions of records in it. It's not clear why several millions of records are accumulated in this 'ArrayList'.

      Quick Googling revealed that 'org.kohuske.stapler.export.Property$BufferedDataWriter' is present in the Stapler library. Apparently Stapler is a web framework used by Jenkins to build user-friendly URLs.

      It isn't clear what's causing the memory leak in this Stapler framework. Appreciate any of your insights.

          [JENKINS-72851] Memory Leak in Stapler web framework?

          Mark Waite added a comment -

          I can't duplicate the issue as reported. My Jenkins controller is 2.440.1 on Java 21.0.2 with 20 or more agents of various types connected. I guessed that something at your location is repeatedly making requests to the /computer/api/ URL so I made thousands of requests to that URL. No increase in memory use was visible from the Jenkins monitoring plugin and its view of memory use.

          I did not test Jenkins 2.401.2 because there are known security vulnerabilities in 2.401.2 that are resolved by installing 2.440.1 or 2.426.3.

          You'll need to provide more information. Refer to "How to report an issue" for the details of the types of information needed.

          Mark Waite added a comment - I can't duplicate the issue as reported. My Jenkins controller is 2.440.1 on Java 21.0.2 with 20 or more agents of various types connected. I guessed that something at your location is repeatedly making requests to the /computer/api/ URL so I made thousands of requests to that URL. No increase in memory use was visible from the Jenkins monitoring plugin and its view of memory use. I did not test Jenkins 2.401.2 because there are known security vulnerabilities in 2.401.2 that are resolved by installing 2.440.1 or 2.426.3. You'll need to provide more information. Refer to "How to report an issue" for the details of the types of information needed.

          Mark Waite added a comment -

          Closing after months with no response to the request for additional information

          Mark Waite added a comment - Closing after months with no response to the request for additional information

            Unassigned Unassigned
            ycrash Ram
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: