jenkinsci / cucumber-living-documentation-plugin

https://plugins.jenkins.io/cucumber-living-documentation/
https://plugins.jenkins.io/cucumber-living-documentation/
MIT License
15 stars 11 forks source link

File handles leak #32

Open nicodn opened 3 years ago

nicodn commented 3 years ago

Running Jenkins 2.263.3 on ubuntu 14 we noticed that this plugin was causing a file handles leak:

3127 descriptors are open
#1 /tmp/jruby-1136/jruby3454834155092316185parser.jar by thread:pool-5869-thread-1 on Mon Feb 01 18:13:23 EST 2021
    at java.util.zip.ZipFile.<init>(ZipFile.java:156)
    at java.util.jar.JarFile.<init>(JarFile.java:166)
    at java.util.jar.JarFile.<init>(JarFile.java:103)
    at org.jruby.util.JarCache$JarIndex.<init>(JarCache.java:47)
    at org.jruby.util.JarCache.getIndex(JarCache.java:142)
    at org.jruby.util.JarResource.createJarResource(JarResource.java:47)
    at org.jruby.util.JarResource.create(JarResource.java:37)
    at org.jruby.util.URLResource.addDirectoryEntries(URLResource.java:241)
    at org.jruby.util.URLResource.addDirectoriesFromClassloader(URLResource.java:230)
    at org.jruby.util.URLResource.createClassloaderURI(URLResource.java:210)
    at org.jruby.util.URLResource.create(URLResource.java:267)
    at org.jruby.util.JRubyFile.createResource(JRubyFile.java:105)
    at org.jruby.util.JRubyFile.createResource(JRubyFile.java:78)
    at org.jruby.RubyFileTest.exist(RubyFileTest.java:129)
    at org.jruby.RubyFile.realpath(RubyFile.java:900)
    at org.jruby.RubyKernel.require_relative(RubyKernel.java:997)
    at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
    at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
    at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
    at org.jruby.Ruby.loadFile(Ruby.java:2785)
    at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
    at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
    at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
    at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
    at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
    at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
    at org.jruby.RubyKernel.require(RubyKernel.java:974)
    at org.jruby.RubyKernel.require_relative(RubyKernel.java:1002)
    at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
    at org.jruby.ir.instructions.DefineModuleInstr.INTERPRET_MODULE(DefineModuleInstr.java:81)
    at org.jruby.ir.instructions.DefineModuleInstr.interpret(DefineModuleInstr.java:69)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
    at org.jruby.ir.instructions.DefineModuleInstr.INTERPRET_MODULE(DefineModuleInstr.java:81)
    at org.jruby.ir.instructions.DefineModuleInstr.interpret(DefineModuleInstr.java:69)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:80)
    at org.jruby.ir.instructions.DefineModuleInstr.INTERPRET_MODULE(DefineModuleInstr.java:81)
    at org.jruby.ir.instructions.DefineModuleInstr.interpret(DefineModuleInstr.java:69)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.processOtherOp(StartupInterpreterEngine.java:178)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:104)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
    at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
    at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
    at org.jruby.Ruby.loadFile(Ruby.java:2785)
    at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
    at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
    at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
    at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
    at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
    at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
    at org.jruby.RubyKernel.require(RubyKernel.java:974)
    at org.jruby.RubyKernel.require_relative(RubyKernel.java:1002)
    at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
    at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
    at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
    at org.jruby.Ruby.loadFile(Ruby.java:2785)
    at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
    at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
    at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
    at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
    at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
    at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
    at org.jruby.RubyKernel.require(RubyKernel.java:974)
    at org.jruby.RubyKernel.require_relative(RubyKernel.java:1002)
    at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
    at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
    at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
    at org.jruby.Ruby.loadFile(Ruby.java:2785)
    at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
    at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
    at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
    at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
    at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
    at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
    at org.jruby.RubyKernel.require(RubyKernel.java:974)
    at org.jruby.RubyKernel.require_relative(RubyKernel.java:1002)
    at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
    at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
    at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
    at org.jruby.Ruby.loadFile(Ruby.java:2785)
    at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
    at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
    at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
    at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
    at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
    at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
    at org.jruby.RubyKernel.require(RubyKernel.java:974)
    at org.jruby.RubyKernel.require_relative(RubyKernel.java:1002)
    at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
    at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
    at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
    at org.jruby.Ruby.loadFile(Ruby.java:2785)
    at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
    at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
    at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
    at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
    at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
    at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
    at org.jruby.RubyKernel.require(RubyKernel.java:974)
    at org.jruby.RubyKernel.require_relative(RubyKernel.java:1002)
    at org.jruby.RubyKernel$INVOKER$s$1$0$require_relative.call(RubyKernel$INVOKER$s$1$0$require_relative.gen)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
    at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
    at org.jruby.Ruby.runInterpreter(Ruby.java:1218)
    at org.jruby.Ruby.loadFile(Ruby.java:2785)
    at org.jruby.runtime.load.LibrarySearcher$ResourceLibrary.load(LibrarySearcher.java:234)
    at org.jruby.runtime.load.LibrarySearcher$FoundLibrary.load(LibrarySearcher.java:34)
    at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:887)
    at org.jruby.runtime.load.LoadService.smartLoadInternal(LoadService.java:535)
    at org.jruby.runtime.load.LoadService.require(LoadService.java:402)
    at org.jruby.RubyKernel.requireCommon(RubyKernel.java:981)
    at org.jruby.RubyKernel.require(RubyKernel.java:974)
    at org.jruby.RubyKernel$INVOKER$s$1$0$require.call(RubyKernel$INVOKER$s$1$0$require.gen)
    at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:417)
    at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:97)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:172)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:86)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:156)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:143)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:375)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:174)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:316)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:72)
    at org.jruby.ir.interpreter.Interpreter.INTERPRET_ROOT(Interpreter.java:96)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:81)
    at org.jruby.ir.interpreter.Interpreter.execute(Interpreter.java:30)
    at org.jruby.ir.IRTranslator.execute(IRTranslator.java:42)
    at org.jruby.Ruby.evalScriptlet(Ruby.java:860)
    at org.jruby.Ruby.evalScriptlet(Ruby.java:836)
    at org.asciidoctor.jruby.internal.RubyUtils.requireLibrary(RubyUtils.java:27)
    at org.asciidoctor.jruby.internal.JRubyAsciidoctor.requireLibraries(JRubyAsciidoctor.java:231)
    at org.asciidoctor.jruby.internal.JRubyAsciidoctor.requireLibrary(JRubyAsciidoctor.java:224)
    at com.github.cukedoctor.CukedoctorMain.execute(CukedoctorMain.java:235)
    at com.github.cukedoctor.jenkins.CukedoctorPublisher.generateDocumentation(CukedoctorPublisher.java:276)
    at com.github.cukedoctor.jenkins.CukedoctorPublisher.lambda$run$1(CukedoctorPublisher.java:260)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Found using the file handles plugin.

Also the links to the living doc are broken (/cucumber-living-documentation/docsHtml/) since we enabled artifact manager on S3 plugin.

Screen Shot 2021-02-03 at 10 50 29 AM