killbill / killbill-plugin-framework-ruby

Framework to write Kill Bill plugins in Ruby
http://killbill.io
8 stars 11 forks source link

IllegalArgumentException during logger call #28

Open pierre opened 9 years ago

pierre commented 9 years ago

This happens during the following logger call (log level is set to WARN): https://github.com/killbill/killbill-plugin-framework-ruby/blob/kares-performance/lib/killbill/helpers/active_merchant/payment_plugin.rb#L39

Caused by: java.lang.IllegalArgumentException: null
    at org.jruby.internal.runtime.methods.InvocationMethodFactory.getBlockCallback19(InvocationMethodFactory.java:1009)
    at org.jruby.runtime.Helpers.createBlockCallback19(Helpers.java:154)
    at org.jruby.runtime.Helpers.createCompiledBlockBody19(Helpers.java:244)
    at org.jruby.runtime.Helpers.createCompiledBlockBody19(Helpers.java:236)
    at org.jruby.ast.executable.RuntimeCache.createBlockBody19(RuntimeCache.java:452)
    at org.jruby.ast.executable.RuntimeCache.getBlockBody19(RuntimeCache.java:86)
    at org.jruby.ast.executable.AbstractScript.getBlockBody190(AbstractScript.java:123)
    at rubyjit.Killbill::Plugin::ActiveMerchant::PaymentPlugin$$after_request_154c2618c4569855669d618315121d81adb8c2fe1152006570.__file__(/var/tmp/bundles/plugins/ruby/killbill-litle/1.10.0/gems/gems/killbill-3.2.2/lib/killbill/helpers/active_merchant/payment_plugin.rb:39)
    at rubyjit.Killbill::Plugin::ActiveMerchant::PaymentPlugin$$after_request_154c2618c4569855669d618315121d81adb8c2fe1152006570.__file__(/var/tmp/bundles/plugins/ruby/killbill-litle/1.10.0/gems/gems/killbill-3.2.2/lib/killbill/helpers/active_merchant/payment_plugin.rb)
    at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:141)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
    at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
    at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
    at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:98)
    at org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
    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:112)
    at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:167)
    at Killbill$$Plugin$$Api$$PaymentPluginApi_941728739.addPaymentMethod(Killbill$$Plugin$$Api$$PaymentPluginApi_941728739.gen:13)
    at org.killbill.billing.osgi.bundles.jruby.JRubyPaymentPlugin$9.doCall(JRubyPaymentPlugin.java:159)
    at org.killbill.billing.osgi.bundles.jruby.JRubyPaymentPlugin$9.doCall(JRubyPaymentPlugin.java:156)
    at org.killbill.billing.osgi.bundles.jruby.JRubyPlugin.callWithRuntimeAndChecking(JRubyPlugin.java:241)
    at org.killbill.billing.osgi.bundles.jruby.JRubyPaymentPlugin.addPaymentMethod(JRubyPaymentPlugin.java:156)
    at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.killbill.billing.osgi.ContextClassLoaderHelper$1$1.execute(ContextClassLoaderHelper.java:83)
    at org.killbill.commons.profiling.Profiling.executeWithProfiling(Profiling.java:37)
    at org.killbill.billing.osgi.ContextClassLoaderHelper$1.invoke(ContextClassLoaderHelper.java:80)
    at com.sun.proxy.$Proxy162.addPaymentMethod(Unknown Source)
    at org.killbill.billing.payment.core.PaymentMethodProcessor$1.doOperation(PaymentMethodProcessor.java:116)
    at org.killbill.billing.payment.core.PaymentMethodProcessor$1.doOperation(PaymentMethodProcessor.java:107)
    at org.killbill.billing.payment.core.ProcessorBase$WithAccountLock.processAccountWithLock(ProcessorBase.java:219)
    at org.killbill.billing.payment.core.ProcessorBase$CallableWithAccountLock.call(ProcessorBase.java:208)
    at org.killbill.billing.payment.core.ProcessorBase$CallableWithAccountLock.call(ProcessorBase.java:192)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    ... 1 common frames omitted
kares commented 9 years ago

interesting, now the thing is I've been using an updated (custom 1.7.20.SNAPSHOT) JRuby for a while, but this seems like it should still be there ... are you running Tomcat, any details about your KB setup

pierre commented 9 years ago

I managed to trigger this by flooding the server with a lot of requests without warm-up (50 threads). I've also noticed other strange behaviors (such as https://github.com/killbill/killbill-plugin-framework-ruby/issues/29). Once the server is warmed-up however, I wasn't able to reproduce either issue.

FYI, I'm running KB locally in Jetty (https://github.com/killbill/killbill/blob/master/bin/start-server).