Although FilePath.validateAntFileMask is typically bounded to check at most 10000 files before giving up and announcing that it cannot find a match, it turns out that DirectoryScanner collects the names of non-matches in filesNotIncluded and dirsNotIncluded in the meantime. In a big workspace, this can cause the JVM (usually a slave agent) to allocate gigabytes of heap, eventually causing the slave to become overwhelmed and crash.

          [JENKINS-25759] FilePath.validateAntFileMask sucks up heap

          Jesse Glick created issue -
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-7214 [ JENKINS-7214 ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "Apache bug #57253 (Web Link)" [ 11918 ]
          Jesse Glick made changes -
          Labels Original: performance New: lts-candidate performance
          Jesse Glick made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Oliver Gondža made changes -
          Labels Original: lts-candidate performance New: 1.580.3-fixed performance
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 159737 ] New: JNJira + In-Review [ 196184 ]

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: