jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-2263

Running merb under a concurrent load causes ArrayIndexOutOfBoundsExceptions

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: JRuby 1.1.6
  • Component/s: Application Error
  • Labels:
    None

Description

I ran merb under a heavy concurrent load. I don't know where the fault lies. Threads died with this stack trace:

Exception in thread "Ruby Thread1110716565" java.lang.ArrayIndexOutOfBoundsException: 10
at org.jruby.RubyArray.append(RubyArray.java:890)
at org.jruby.RubyArrayInvoker$append_method_1_0.call(Unknown Source)
at org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:304)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.merb_minus_core_minus_0_dot_9_dot_1.lib.merb_minus_core.logger.lt_lt_961102770_41850249.file_(/usr/local/jruby-latest/lib/ruby/gems/1.8/gems/merb-core-0.9.1/lib/merb-core/logger.rb:176)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:82)
at org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:317)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.merb_minus_core_minus_0_dot_9_dot_1.lib.merb_minus_core.logger.info288202835_605221117._file_(/usr/local/jruby-latest/lib/ruby/gems/1.8/gems/merb-core-0.9.1/lib/merb-core/logger.rb:218)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:78)
at org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:304)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.merb_minus_core_minus_0_dot_9_dot_1.lib.merb_minus_core.dispatch.dispatcher.handle730502382_521502695.__rescue_1(/usr/local/jruby-latest/lib/ruby/gems/1.8/gems/merb-core-0.9.1/lib/merb-core/dispatch/dispatcher.rb:30)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.merb_minus_core_minus_0_dot_9_dot_1.lib.merb_minus_core.dispatch.dispatcher.handle730502382_521502695._file_(/usr/local/jruby-latest/lib/ruby/gems/1.8/gems/merb-core-0.9.1/lib/merb-core/dispatch/dispatcher.rb)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:78)
at org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:304)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.merb_minus_core_minus_0_dot_9_dot_1.lib.merb_minus_core.rack.application.call403828297_521502695.__rescue_1(/usr/local/jruby-latest/lib/ruby/gems/1.8/gems/merb-core-0.9.1/lib/merb-core/rack/application.rb:37)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.merb_minus_core_minus_0_dot_9_dot_1.lib.merb_minus_core.rack.application.call403828297_521502695._file_(/usr/local/jruby-latest/lib/ruby/gems/1.8/gems/merb-core-0.9.1/lib/merb-core/rack/application.rb:36)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:78)
at org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:304)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.merb_minus_core_minus_0_dot_9_dot_1.lib.merb_minus_core.rack.handler.mongrel.process176969151_521502695._file_(/usr/local/jruby-latest/lib/ruby/gems/1.8/gems/merb-core-0.9.1/lib/merb-core/rack/handler/mongrel.rb:67)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:86)
at org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:336)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.mongrel_minus_1_dot_1_dot_4_minus_java.lib.mongrel.process_client306824177_521502695.closure_157_1(/usr/local/jruby-latest/lib/ruby/gems/1.8/gems/mongrel-1.1.4-java/lib/mongrel.rb:159)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.mongrel_minus_1_dot_1_dot_4_minus_java.lib.mongrel.process_client306824177_521502695Blockclosure_157_1xx1.call(Unknown Source)
at org.jruby.runtime.CompiledBlockLight.yield(CompiledBlockLight.java:107)
at org.jruby.runtime.CompiledBlockLight.yield(CompiledBlockLight.java:88)
at org.jruby.runtime.Block.yield(Block.java:109)
at org.jruby.RubyArray.each(RubyArray.java:1179)
at org.jruby.RubyArrayInvoker$each_method_0_0.call(Unknown Source)
at org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:285)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.mongrel_minus_1_dot_1_dot_4_minus_java.lib.mongrel.process_client306824177_521502695.__rescue_1(/usr/local/jruby-latest/lib/ruby/gems/1.8/gems/mongrel-1.1.4-java/lib/mongrel.rb:158)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.mongrel_minus_1_dot_1_dot_4_minus_java.lib.mongrel.process_client306824177_521502695.__ensure_1(/usr/local/jruby-latest/lib/ruby/gems/1.8/gems/mongrel-1.1.4-java/lib/mongrel.rb)
at ruby.jit.ruby.usr.local.jruby_minus_latest.lib.ruby.gems.$1_dot_8.gems.mongrel_minus_1_dot_1_dot_4_minus_java.lib.mongrel.process_client306824177_521502695._file_(/usr/local/jruby-latest/lib/ruby/gems/1.8/gems/mongrel-1.1.4-java/lib/mongrel.rb:110)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:144)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:66)
at org.jruby.runtime.CallSite$InlineCachingCallSite.call(CallSite.java:240)
at org.jruby.evaluator.ASTInterpreter.fCallNode(ASTInterpreter.java:1100)
at org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:354)
at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:150)
at org.jruby.runtime.InterpretedBlock.call(InterpretedBlock.java:103)
at org.jruby.runtime.Block.call(Block.java:105)
at org.jruby.RubyProc.call(RubyProc.java:203)
at org.jruby.RubyProc.call(RubyProc.java:182)
at org.jruby.internal.runtime.RubyNativeThread.run(RubyNativeThread.java:72)

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Nick Sieger added a comment - 26/Jul/08 12:24 AM

Interesting, it seems to happen during logging. Does it get better or go away if you turn logging off?

Can you share a sample merb controller or application that exhibits the behaviour?

Show
Nick Sieger added a comment - 26/Jul/08 12:24 AM Interesting, it seems to happen during logging. Does it get better or go away if you turn logging off? Can you share a sample merb controller or application that exhibits the behaviour?
Hide
Permalink
Charles Oliver Nutter added a comment - 13/Feb/09 8:48 PM

I believe Mental "fixed" this in JRuby 1.1.6 by making most array operations either trivially thread-safe or by making them through a new Ruby error ConcurrencyError. We won't make these collections 100% threadsafe due to the cost involved, and concurrent use should be under mutex (which I believe Merb also added).

Show
Charles Oliver Nutter added a comment - 13/Feb/09 8:48 PM I believe Mental "fixed" this in JRuby 1.1.6 by making most array operations either trivially thread-safe or by making them through a new Ruby error ConcurrencyError. We won't make these collections 100% threadsafe due to the cost involved, and concurrent use should be under mutex (which I believe Merb also added).

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    Joshua Hull
Vote (0)
Watch (4)

Dates

  • Created:
    12/Mar/08 9:56 AM
    Updated:
    21/Mar/09 1:14 PM
    Resolved:
    13/Feb/09 8:48 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.