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

allBuilds eagerly loads every build into memory before applying pagination

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
    • Environment:
      Ubuntu 16.04, Jenkins 2.89.4 (I also verified that no similar bug was fixed in the subsequent changelog)
    • Similar Issues:

      Description

      It seems that `?tree=allBuilds[number]{0,1}` unconditionally forces Jenkins to load all builds into memory. If the number of builds is large this canĀ denial-of-service your Jenkins instance.

      Steps to reproduce:

      1. Find a Jenkins instance with a job that has a very long history
      2. Verify that the standard REST query (for 100 jobs) executes quickly. For example: https://example.com/jenkins/job/my-job/api/json
      3. Now runĀ https://example.com/jenkins/job/my-job/api/json?tree=allBuilds[number]{0,1}

      Expected result: It runs fast

      Actual result: Jenkins goes out to lunch.

        Attachments

          Activity

          ezyang Edward Yang created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              ezyang Edward Yang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: