Call to SSLSocket.new(io, ctx) fails with "wrong # of arguments(2 for 0)"
-------------------------------------------------------------------------
Key: JRUBY-5257
URL: http://jira.codehaus.org/browse/JRUBY-5257
Project: JRuby
Issue Type: Bug
Components: Extensions, Interpreter
Affects Versions: JRuby-OSSL 0.7.2, JRuby 1.5.6, JRuby 1.5.5, JRuby 1.5.4,
JRuby 1.5.3
Environment: JRuby 1.5 (1.5.3 - 1.5.6), jruby-openssl-0.7.2, Tomcat 6
Reporter: David Settle
Call to SSLSocket.new fails with "wrong # of arguments(2 for 0)"
conn = OpenSSL::SSL::SSLSocket.new(io, ctx)
For some reason, the JRuby interpreter is calling a version of SSLSocket with a
no-argument initializer, even though jruby-openssl-0.7.2 is installed and
available.
The JRuby interpreter sometimes loads in such a way that the problem never
happens, or it sometimes so so that the problem always happens. At the moment
we have to keep restarting Tomcat until we get a loaded version of JRuby which
works.
I have modified the JRuby 1.5.5 interpreter to dump the stack when raising an
argument error, and the internal JRuby stack when the error occurs (from the
call above) is:
Stack Trace: java.lang.UnsupportedOperationException: possible SSLSocket issue
- dumping stack
at org.jruby.Ruby.newArgumentError(Ruby.java:3017)
at org.jruby.runtime.Arity.raiseArgumentError(Arity.java:266)
at
org.jruby.internal.runtime.methods.JavaMethod.raiseArgumentError(JavaMethod.java:215)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZero.call(JavaMethod.java:835)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:642)
at
org.jruby.javasupport.util.RuntimeHelpers.invokeSuper(RuntimeHelpers.java:518)
at
org.jruby.javasupport.JavaEmbedUtils$1.callSuper(JavaEmbedUtils.java:155)
at org.jruby.ext.openssl.SSLSocket._initialize(SSLSocket.java:134)
at
org.jruby.ext.openssl.SSLSocket$i_method_0_0$RUBYFRAMEDINVOKER$_initialize.call(org/jruby/ext/openssl/SSLSocket$i_method_0_0$RUBYFRAMEDINVOKER$_initialize.gen:65535)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:198)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:339)
at
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:197)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)
at org.jruby.RubyClass$SpecificArityNew.call(RubyClass.java:815)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:194)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:329)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:188)
at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:180)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:174)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.InstAsgnNode.interpret(InstAsgnNode.java:95)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.WhenOneArgNode.when(WhenOneArgNode.java:49)
at org.jruby.ast.CaseNode.interpret(CaseNode.java:133)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:180)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:174)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.IfNode.interpret(IfNode.java:117)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:201)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:319)
at
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:157)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:162)
at org.jruby.RubyClass$SpecificArityNew.call(RubyClass.java:804)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:186)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.DAsgnNode.interpret(DAsgnNode.java:110)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:294)
at
org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:228)
at org.jruby.runtime.Block.yieldSpecific(Block.java:99)
at org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:294)
at
org.jruby.runtime.InterpretedBlock.yieldSpecific(InterpretedBlock.java:228)
at org.jruby.runtime.Block.yieldSpecific(Block.java:99)
at org.jruby.ast.ZYieldNode.interpret(ZYieldNode.java:25)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:160)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:166)
at
org.jruby.internal.runtime.methods.WrapperMethod.call(WrapperMethod.java:74)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:299)
at
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:117)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:122)
at
org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:201)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:182)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:319)
at
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:157)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:162)
at
org.jruby.ast.CallOneArgBlockNode.interpret(CallOneArgBlockNode.java:60)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:113)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:127)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:149)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:279)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:68)
at org.jruby.ast.CallManyArgsNode.interpret(CallManyArgsNode.java:59)
at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:199)
at
org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:118)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:110)
at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.Ruby.loadFile(Ruby.java:2553)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:61)
at org.jruby.runtime.load.LoadService.load(LoadService.java:255)
at org.jruby.RubyKernel.loadCommon(RubyKernel.java:1010)
at org.jruby.RubyKernel.load(RubyKernel.java:992)
at
org.jruby.RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.call(org/jruby/RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.gen:65535)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:190)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:186)
at
org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:146)
at
org.jruby.ast.FCallSpecialArgNode.interpret(FCallSpecialArgNode.java:39)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.IfNode.interpret(IfNode.java:119)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:199)
at
org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:118)
at org.jruby.ast.RescueNode.interpret(RescueNode.java:110)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:180)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:174)
at
org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:146)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:346)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:303)
at org.jruby.runtime.Block.yield(Block.java:194)
at org.jruby.RubyArray.eachCommon(RubyArray.java:1630)
at org.jruby.RubyArray.each(RubyArray.java:1637)
at
org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.call(org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:65535)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:299)
at
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:117)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:122)
at
org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.IfNode.interpret(IfNode.java:117)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:158)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:289)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:108)
at org.jruby.ast.VCallNode.interpret(VCallNode.java:85)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:160)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:166)
at org.jruby.RubyClass.finvoke(RubyClass.java:502)
at org.jruby.RubyObject.send(RubyObject.java:1437)
at
org.jruby.RubyObject$i_method_multi$RUBYINVOKER$send.call(org/jruby/RubyObject$i_method_multi$RUBYINVOKER$send.gen:65535)
at
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(JavaMethod.java:266)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:160)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:166)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:299)
at
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:117)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:122)
at
org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.Ruby.loadFile(Ruby.java:2553)
at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:61)
at org.jruby.runtime.load.LoadService.load(LoadService.java:255)
at org.jruby.RubyKernel.loadCommon(RubyKernel.java:1010)
at org.jruby.RubyKernel.load(RubyKernel.java:992)
at
org.jruby.RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.call(org/jruby/RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.gen:65535)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:190)
at
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:186)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:158)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:289)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:108)
at org.jruby.ast.VCallNode.interpret(VCallNode.java:85)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:158)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:289)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:108)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:158)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:289)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:108)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:373)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:327)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:366)
at org.jruby.runtime.Block.yieldNonArray(Block.java:205)
at org.jruby.RubyObject.yieldUnder(RubyObject.java:507)
at org.jruby.RubyObject.specificEval(RubyObject.java:331)
at org.jruby.RubyObject.instance_eval(RubyObject.java:1285)
at
org.jruby.RubyObject$i_method_multi$RUBYFRAMEDINVOKER$instance_eval.call(org/jruby/RubyObject$i_method_multi$RUBYFRAMEDINVOKER$instance_eval.gen:65535)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:299)
at
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:117)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:122)
at
org.jruby.ast.FCallNoArgBlockPassNode.interpret(FCallNoArgBlockPassNode.java:27)
at org.jruby.ast.IfNode.interpret(IfNode.java:117)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:160)
at
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:166)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:299)
at
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:117)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:122)
at org.jruby.RubyClass$SpecificArityNew.call(RubyClass.java:793)
at
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:299)
at
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:117)
at
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:122)
at
org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
at org.jruby.Ruby.evalScriptlet(Ruby.java:317)
at org.jruby.Ruby.evalScriptlet(Ruby.java:294)
at
org.jruby.rack.DefaultRackApplicationFactory.createRackServletWrapper(DefaultRackApplicationFactory.java:164)
at
org.jruby.rack.rails.RailsRackApplicationFactory.createApplicationObject(RailsRackApplicationFactory.java:22)
at
org.jruby.rack.DefaultRackApplicationFactory$1.create(DefaultRackApplicationFactory.java:52)
at
org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:182)
at
org.jruby.rack.PoolingRackApplicationFactory$1.run(PoolingRackApplicationFactory.java:157)
at java.lang.Thread.run(Thread.java:619)
<br>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email