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

File leaks in AntClassLoader#findClassInComponents()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • jenkins-2.18

      It has been originally reported by Coverity in https://scan5.coverity.com/reports.htm#v36021/p10292/fileInstanceId=97573616&defectInstanceId=28155759&mergedDefectId=1205051. It happens on Exceptional paths only, but actually I see these runaway handlers on my jenkins-2.18 instance. Maybe happens due to plugin dynamic load failure, but I have 31 handlers of such kind.

      #9 /Users/nenashev/Documents/jenkins/test/jenkins-2.16/jenkins/plugins/script-security/WEB-INF/lib/script-security.jar by thread:Loading plugin Job and Slave ownership plugin v0.8 (ownership) on Fri Aug 19 18:48:22 CEST 2016
      	at java.util.zip.ZipFile.<init>(ZipFile.java:151)
      	at java.util.jar.JarFile.<init>(JarFile.java:166)
      	at java.util.jar.JarFile.<init>(JarFile.java:130)
      	at jenkins.util.AntClassLoader.getResourceStream(AntClassLoader.java:798)
      	at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1362)
      	at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
      	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at jenkins.ClassLoaderReflectionToolkit.invoke(ClassLoaderReflectionToolkit.java:44)
      	at jenkins.ClassLoaderReflectionToolkit._findClass(ClassLoaderReflectionToolkit.java:81)
      	at hudson.ClassicPluginStrategy$DependencyClassLoader.findClass(ClassicPluginStrategy.java:765)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	at jenkins.util.AntClassLoader.findBaseClass(AntClassLoader.java:1398)
      	at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1075)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:507)
      	at hudson.PluginManager$2$1$1.run(PluginManager.java:517)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      	at jenkins.model.Jenkins$7.runTask(Jenkins.java:1026)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: