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

File Descriptor leaks when parsing Groovy Class files in Stapler (Groovy UI)

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
    • Environment:
      jenkins-2.7.3
      staple 1.243 (default for this version)
    • Similar Issues:

      Description

      It happens due to the issue similar to JENKINS-37041. JarUrlConnection is not being processed correctly.
      Potential impact is low since we are not going to replace the files on the flight

      #796 /Users/nenashev/Documents/.../test/plugins/git/WEB-INF/lib/git.jar by thread:Handling GET /jenkins/job/FooTimestamped/configure from 0:0:0:0:0:0:0:1 : RequestHandlerThread[#22] Job/configure.jelly Project/configure-entries.jelly AbstractProject/configure-common.jelly AbstractProject/configure-scm.jellytag GitSCM/DescriptorImpl/config.jelly on Mon Sep 05 15:02:56 CEST 2016
      	at java.io.FileInputStream.<init>(FileInputStream.java:139)
      	at java.io.FileInputStream.<init>(FileInputStream.java:93)
      	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
      	at sun.net.www.protocol.file.FileURLConnection.initializeHeaders(FileURLConnection.java:110)
      	at sun.net.www.protocol.file.FileURLConnection.getHeaderField(FileURLConnection.java:146)
      	at sun.net.www.protocol.jar.JarURLConnection.getHeaderField(JarURLConnection.java:228)
      	at java.net.URLConnection.getContentEncoding(URLConnection.java:523)
      	at groovy.lang.GroovyCodeSource.<init>(GroovyCodeSource.java:176)
      	at org.kohsuke.stapler.jelly.groovy.GroovyClassLoaderTearOff.parse(GroovyClassLoaderTearOff.java:89)
      	at org.kohsuke.stapler.jelly.groovy.GroovyClassTearOff.parseScript(GroovyClassTearOff.java:50)
      	at org.kohsuke.stapler.jelly.groovy.GroovyClassTearOff.parseScript(GroovyClassTearOff.java:39)
      	at org.kohsuke.stapler.AbstractTearOff.resolveScript(AbstractTearOff.java:91)
      	at org.kohsuke.stapler.jelly.JellyClassTearOff.resolveScript(JellyClassTearOff.java:85)
      	at org.kohsuke.stapler.jelly.JellyClassTearOff.resolveScript(JellyClassTearOff.java:47)
      	at org.kohsuke.stapler.AbstractTearOff.loadScript(AbstractTearOff.java:97)
      	at org.kohsuke.stapler.CachingScriptLoader$1.load(CachingScriptLoader.java:31)
      	at org.kohsuke.stapler.CachingScriptLoader$1.load(CachingScriptLoader.java:28)
      	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
      	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
      	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
      	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
      	at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
      	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
      	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)
      	at com.google.common.cache.LocalCache$LocalManualCache.getUnchecked(LocalCache.java:4834)
      	at org.kohsuke.stapler.CachingScriptLoader.findScript(CachingScriptLoader.java:62)
      	at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:112)
      	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      
      #100 /Users/nenashev/Documents/.../test/plugins/github/WEB-INF/lib/github.jar by thread:Handling GET /jenkins/job/FooTimestamped/configure from 0:0:0:0:0:0:0:1 : RequestHandlerThread[#22] Job/configure.jelly Project/configure-entries.jelly on Mon Sep 05 15:02:56 CEST 2016
      	at java.io.FileInputStream.<init>(FileInputStream.java:139)
      	at java.io.FileInputStream.<init>(FileInputStream.java:93)
      	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
      	at sun.net.www.protocol.file.FileURLConnection.initializeHeaders(FileURLConnection.java:110)
      	at sun.net.www.protocol.file.FileURLConnection.getHeaderField(FileURLConnection.java:146)
      	at sun.net.www.protocol.jar.JarURLConnection.getHeaderField(JarURLConnection.java:228)
      	at java.net.URLConnection.getContentEncoding(URLConnection.java:523)
      	at groovy.lang.GroovyCodeSource.<init>(GroovyCodeSource.java:176)
      	at org.kohsuke.stapler.jelly.groovy.GroovyClassLoaderTearOff.parse(GroovyClassLoaderTearOff.java:89)
      	at org.kohsuke.stapler.jelly.groovy.GroovyClassTearOff.parseScript(GroovyClassTearOff.java:50)
      	at org.kohsuke.stapler.jelly.groovy.GroovyClassTearOff.parseScript(GroovyClassTearOff.java:39)
      	at org.kohsuke.stapler.AbstractTearOff.resolveScript(AbstractTearOff.java:91)
      	at org.kohsuke.stapler.jelly.JellyClassTearOff.resolveScript(JellyClassTearOff.java:85)
      	at org.kohsuke.stapler.jelly.JellyClassTearOff.resolveScript(JellyClassTearOff.java:47)
      	at org.kohsuke.stapler.AbstractTearOff.loadScript(AbstractTearOff.java:97)
      	at org.kohsuke.stapler.CachingScriptLoader$1.load(CachingScriptLoader.java:31)
      	at org.kohsuke.stapler.CachingScriptLoader$1.load(CachingScriptLoader.java:28)
      	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
      	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
      

      Repro steps:

      1. Install Jenkins 2.7.3 with default plugins (Git and GitHub)
      2. Launch instance with File Leak detector
      3. Create a FreeStyle job, open it's config page
      4. Close it
      5. Check the output of FileLeak Detector

        Attachments

          Issue Links

            Activity

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            CC Mark Waite and Kirill Merkushev since their plugins are affected.
            Not a big problem since the impact is not visible

            Show
            oleg_nenashev Oleg Nenashev added a comment - CC Mark Waite and Kirill Merkushev since their plugins are affected. Not a big problem since the impact is not visible
            Hide
            danielbeck Daniel Beck added a comment -
            Show
            danielbeck Daniel Beck added a comment - Looks more like a bug for https://github.com/stapler/stapler/issues

              People

              • Assignee:
                Unassigned
                Reporter:
                oleg_nenashev Oleg Nenashev
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: