-
-
Notifications
You must be signed in to change notification settings - Fork 942
Description
I'm seeing a very odd error that is present for 1.7.4, 1.7.2 and 1.7.0, but not 1.6.8.
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on OpenJDK 64-Bit Server VM 1.7.0_09-b30 [linux-amd64]
Based on the exception, which is included below, it's difficult to trace this to a single line of code. jruby seems to be trying to turn the string "0.25" into an integer, but I can't identify any code of mine that is requesting this. It definitely seems to be that this is internal to jruby, and not my code. Again, I have run this code for many days in 1.6.8, and have never had this issue.
It would be very difficult to share the code that creates this issue, but I'm more than happy to try any suggestions you might have to help identify what the issue is with jruby.
It seems that the stack trace is unintelligible due to various optimizations. Is it possible to turn off some of those optimizations so that the stack trace is more meaningful?
Thanks in advance.
Cheers,
Jon
[ 2006-02-21 10:44:15.131 ] ERROR: GenericPairTrading: Exception - For input string: "0.25"
[ 2006-02-21 10:44:15.132 ] ERROR: GenericPairTrading: java.lang.NumberFormatException.forInputString(NumberFormatException.jav
a:65)
java.lang.Integer.parseInt(Integer.java:492)
java.lang.Integer.parseInt(Integer.java:527)
org.jruby.javasupport.util.RuntimeHelpers.createCompiledBlockBody19(RuntimeHelpers.java:241)
org.jruby.ast.executable.RuntimeCache.createBlockBody19(RuntimeCache.java:459)
org.jruby.ast.executable.RuntimeCache.getBlockBody19(RuntimeCache.java:84)
org.jruby.ast.executable.AbstractScript.getBlockBody190(AbstractScript.java:123)
rubyjit.GenericPairTrading$$execution_callback_CF62DCF686AD055F50B900221953DEA265423CAA1978026173.__file__(/mnt/ec2_work/001/TICKER_IWF,0.25,start_date,2006-02-20,STRATEGY_IWF,0.04,SIWF_KINK,2500,end_date,2006-03-30/GenericPairTrading.rb
:196)
rubyjit.GenericPairTrading$$execution_callback_CF62DCF686AD055F50B900221953DEA265423CAA1978026173.__file__(/mnt/ec2_work/001/TICKER_IWF,0.25,start_date,2006-02-20,STRATEGY_IWF,0.04,SIWF_KINK,2500,end_date,2006-03-30/GenericPairTrading.rb)
org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:141)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
org.jruby.ast.FCallNoArgNode.interpret(FCallNoArgNode.java:31)
org.jruby.ast.HashNode.interpret(HashNode.java:96)
org.jruby.ast.ArrayNode.interpretPrimitive(ArrayNode.java:94)
org.jruby.ast.CallManyArgsNode.interpret(CallManyArgsNode.java:57)
org.jruby.ast.DAsgnNode.interpret(DAsgnNode.java:110)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.ast.IfNode.interpret(IfNode.java:116)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.ast.IfNode.interpret(IfNode.java:116)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:209)
org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:160)
org.jruby.runtime.Block.yield(Block.java:130)
org.jruby.RubyArray.eachCommon(RubyArray.java:1606)
org.jruby.RubyArray.each(RubyArray.java:1613)
org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen)
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(ASTInterpreter.java:112)
org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:209)
org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:160)
org.jruby.runtime.Block.yield(Block.java:130)
org.jruby.RubyHash$13.visit(RubyHash.java:1270)
org.jruby.RubyHash.visitAll(RubyHash.java:627)
org.jruby.RubyHash.iteratorVisitAll(RubyHash.java:1221)
org.jruby.RubyHash.each_pairCommon(RubyHash.java:1266)
org.jruby.RubyHash.each_pair(RubyHash.java:1282)
org.jruby.RubyHash$INVOKER$i$0$0$each_pair.call(RubyHash$INVOKER$i$0$0$each_pair.gen)
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)
org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)
org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.ast.RescueNode.executeBody(RescueNode.java:224)
org.jruby.ast.RescueNode.interpret(RescueNode.java:119)
org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.WhileNode.interpret(WhileNode.java:131)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:172)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
$_dot_.TradingStrategy.__file__(./TradingStrategy.rb:431)
$_dot_.TradingStrategy.load(./TradingStrategy.rb)
org.jruby.Ruby.runScript(Ruby.java:810)
org.jruby.Ruby.runScript(Ruby.java:803)
org.jruby.Ruby.runNormally(Ruby.java:674)
org.jruby.Ruby.runFromMain(Ruby.java:523)
org.jruby.Main.doRunFromMain(Main.java:390)
org.jruby.Main.internalRun(Main.java:279)
org.jruby.Main.run(Main.java:221)
org.jruby.Main.main(Main.java:201)