You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running JRuby 1.7.25 in a JUnit test (not command line), maven dep:
org.jruby
jruby-complete
1.7.25
no special options, environment variables or gems, just stock JRuby. Running on OSX:
Darwin 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
Expected Behavior
Expect the test to complete, running YAML.load_file() of an empty file, 10000 times in a row. The test fails earlier with file content, and earlier depending on the amount of content in the file it seems. The test fails for me around iteration 1200-1800. The unit test to show the failure is attached (RunTests.txt)
Actual Behavior
snakeyml throws an IOException at around ~1200-1800th iteration, not exact everytime obviously. Iteration number depends on the size of the YAML being read in (no content in my test to make it easier). This is all done on one thread, so there shouldn't be any concurrency or thread safety issues i'd think.
org.jruby.embed.EvalFailedException: org.yaml.snakeyaml.error.YAMLException: java.io.IOException at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:138) at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1360) at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1353) at au.com.nbnco.pos.ib2b.cucumber.RunTests.testYAML(RunTests.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) Caused by: org.yaml.snakeyaml.error.YAMLException: java.io.IOException at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:200) at org.yaml.snakeyaml.reader.StreamReader.<init>(StreamReader.java:60) at org.jruby.ext.psych.PsychParser.readerFor(PsychParser.java:166) at org.jruby.ext.psych.PsychParser.parse(PsychParser.java:178) at org.jruby.ext.psych.PsychParser$INVOKER$i$parse.call(PsychParser$INVOKER$i$parse.gen) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202) at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.ast.IfNode.interpret(IfNode.java:116) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:247) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:211) at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:222) at org.jruby.ast.FCallTwoArgBlockNode.interpret(FCallTwoArgBlockNode.java:34) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:225) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202) at org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38) at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:225) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202) at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112) at org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:206) at org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:157) at org.jruby.runtime.Block.yield(Block.java:142) at org.jruby.RubyIO.open(RubyIO.java:1201) at org.jruby.RubyIO$INVOKER$s$0$0$open.call(RubyIO$INVOKER$s$0$0$open.gen) at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:218) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:211) at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:222) at org.jruby.ast.CallTwoArgBlockNode.interpret(CallTwoArgBlockNode.java:62) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.ast.RootNode.interpret(RootNode.java:129) at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121) at org.jruby.Ruby.runInterpreter(Ruby.java:884) at org.jruby.Ruby.runInterpreter(Ruby.java:892) at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:119) ... 29 more Caused by: java.io.IOException at org.jruby.util.io.ChannelStream$InputStreamAdapter.read(ChannelStream.java:1581) at org.jruby.util.IOInputStream.read(IOInputStream.java:122) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177) at java.io.InputStreamReader.read(InputStreamReader.java:184) at java.io.Reader.read(Reader.java:140) at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:184) ... 81 more
The text was updated successfully, but these errors were encountered:
nhoughto
changed the title
YAML.load_file() failes with IOException after a number of iterations
YAML.load_file() fails with IOException after a number of iterations
May 4, 2016
nhoughto
changed the title
YAML.load_file() fails with IOException after a number of iterations
[JRuby 1.7.25] YAML.load_file() fails with IOException after a number of iterations
May 9, 2016
I was going to point out you are missing instance.terminate() but that makes this run even shorter than before. I can see by putting JRUBY_OPTS=-d that this script is choking because each time a new innstance is created we explode something for yaml and they just stack up and eventually we hit some resource issue. If terminate is added it get confused by something else...
Hey
Running JRuby 1.7.25 in a JUnit test (not command line), maven dep:
org.jruby
jruby-complete
1.7.25
no special options, environment variables or gems, just stock JRuby. Running on OSX:
Darwin 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
Expected Behavior
Expect the test to complete, running YAML.load_file() of an empty file, 10000 times in a row. The test fails earlier with file content, and earlier depending on the amount of content in the file it seems. The test fails for me around iteration 1200-1800. The unit test to show the failure is attached (RunTests.txt)
Actual Behavior
snakeyml throws an IOException at around ~1200-1800th iteration, not exact everytime obviously. Iteration number depends on the size of the YAML being read in (no content in my test to make it easier). This is all done on one thread, so there shouldn't be any concurrency or thread safety issues i'd think.
org.jruby.embed.EvalFailedException: org.yaml.snakeyaml.error.YAMLException: java.io.IOException at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:138) at org.jruby.embed.ScriptingContainer.runUnit(ScriptingContainer.java:1360) at org.jruby.embed.ScriptingContainer.runScriptlet(ScriptingContainer.java:1353) at au.com.nbnco.pos.ib2b.cucumber.RunTests.testYAML(RunTests.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) Caused by: org.yaml.snakeyaml.error.YAMLException: java.io.IOException at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:200) at org.yaml.snakeyaml.reader.StreamReader.<init>(StreamReader.java:60) at org.jruby.ext.psych.PsychParser.readerFor(PsychParser.java:166) at org.jruby.ext.psych.PsychParser.parse(PsychParser.java:178) at org.jruby.ext.psych.PsychParser$INVOKER$i$parse.call(PsychParser$INVOKER$i$parse.gen) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202) at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.ast.IfNode.interpret(IfNode.java:116) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:247) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:211) at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:222) at org.jruby.ast.FCallTwoArgBlockNode.interpret(FCallTwoArgBlockNode.java:34) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:225) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202) at org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38) at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:225) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202) at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112) at org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:206) at org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:157) at org.jruby.runtime.Block.yield(Block.java:142) at org.jruby.RubyIO.open(RubyIO.java:1201) at org.jruby.RubyIO$INVOKER$s$0$0$open.call(RubyIO$INVOKER$s$0$0$open.gen) at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:218) at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:211) at org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:222) at org.jruby.ast.CallTwoArgBlockNode.interpret(CallTwoArgBlockNode.java:62) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326) at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57) at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105) at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) at org.jruby.ast.RootNode.interpret(RootNode.java:129) at org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:121) at org.jruby.Ruby.runInterpreter(Ruby.java:884) at org.jruby.Ruby.runInterpreter(Ruby.java:892) at org.jruby.embed.internal.EmbedEvalUnitImpl.run(EmbedEvalUnitImpl.java:119) ... 29 more Caused by: java.io.IOException at org.jruby.util.io.ChannelStream$InputStreamAdapter.read(ChannelStream.java:1581) at org.jruby.util.IOInputStream.read(IOInputStream.java:122) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177) at java.io.InputStreamReader.read(InputStreamReader.java:184) at java.io.Reader.read(Reader.java:140) at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:184) ... 81 more
The text was updated successfully, but these errors were encountered: