ConcurrentModificationException
-------------------------------

                 Key: JRUBY-3177
                 URL: http://jira.codehaus.org/browse/JRUBY-3177
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
    Affects Versions: JRuby 1.1.5
         Environment: JDK 1.6
            Reporter: Peter K Chan


I am seeing an occasional exception at the startup of my app, which happens in 
about 10% of the time. It appears to be some kind of unsynchronized access. 
Stacktrace is provided below.

{quote}
Exception in thread "CPU1" java.util.ConcurrentModificationException
Press the enter key to terminate...
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
        at java.util.HashMap$EntryIterator.next(HashMap.java:834)
        at java.util.HashMap$EntryIterator.next(HashMap.java:832)
        at java.util.HashMap.putAllForCreate(HashMap.java:435)
        at java.util.HashMap.<init>(HashMap.java:225)
        at org.jruby.javasupport.JavaClass.initializeClass(JavaClass.java:487)
        at org.jruby.javasupport.JavaClass.<init>(JavaClass.java:449)
        at org.jruby.javasupport.JavaClass.createJavaClass(JavaClass.java:860)
        at org.jruby.javasupport.JavaClass.get(JavaClass.java:843)
        at org.jruby.javasupport.Java.getInstance(Java.java:446)
        at 
org.jruby.javasupport.JavaUtil.convertJavaToUsableRubyObject(JavaUtil.java:746)
        at 
org.jruby.javasupport.JavaClass$ConstantField.install(JavaClass.java:356)
        at 
org.jruby.javasupport.JavaClass.setupInterfaceModule(JavaClass.java:771)
        at org.jruby.javasupport.Java.getInterfaceModule(Java.java:489)
        at org.jruby.javasupport.Java.getProxyClass(Java.java:571)
        at org.jruby.javasupport.Java.get_proxy_class(Java.java:640)
        at 
org.jruby.javasupport.JavaClass.installClassConstants(JavaClass.java:618)
        at org.jruby.javasupport.JavaClass.setupProxy(JavaClass.java:527)
        at org.jruby.javasupport.Java.createProxyClass(Java.java:660)
        at org.jruby.javasupport.Java.getProxyClass(Java.java:598)
        at 
org.jruby.javasupport.Java.getProxyOrPackageUnderPackage(Java.java:886)
        at 
org.jruby.javasupport.Java.get_proxy_or_package_under_package(Java.java:914)
        at 
org.jruby.javasupport.Java$JavaUtilities.get_proxy_or_package_under_package(Java.java:327)
        at 
org.jruby.javasupport.Java$JavaUtilities$s_method_2_0$RUBYINVOKER$get_proxy_or_package_under_package.call(org/jruby/javasupport/Java$JavaUtilities$s_method_2_0$RUBYINVOKER$get_proxy_or_package_under_package.gen)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:155)
        at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:165)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:142)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:276)
        at org.jruby.RubyClass.finvoke(RubyClass.java:372)
        at 
org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:289)
        at 
org.jruby.javasupport.util.RuntimeHelpers.callMethodMissingInternal(RuntimeHelpers.java:259)
        at 
org.jruby.javasupport.util.RuntimeHelpers.callMethodMissing(RuntimeHelpers.java:247)
        at 
org.jruby.runtime.callsite.CachingCallSite.callMethodMissing(CachingCallSite.java:338)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:257)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)
        at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
        at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:165)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:142)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:213)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)
        at org.jruby.ast.VCallNode.interpret(VCallNode.java:82)
        at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
        at org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:120)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
        at org.jruby.ast.WhenNode.interpret(WhenNode.java:103)
        at org.jruby.ast.SymbolNode.when(SymbolNode.java:92)
        at org.jruby.ast.CaseNode.interpretExpressions(CaseNode.java:133)
        at org.jruby.ast.CaseNode.interpret(CaseNode.java:114)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:165)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:142)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:213)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)
        at org.jruby.ast.VCallNode.interpret(VCallNode.java:82)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:165)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:142)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:213)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)
        at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
        at org.jruby.ast.AndNode.interpret(AndNode.java:91)
        at org.jruby.ast.AndNode.interpret(AndNode.java:87)
        at org.jruby.ast.Node.when(Node.java:220)
        at org.jruby.ast.CaseNode.interpretExpressions(CaseNode.java:133)
        at org.jruby.ast.CaseNode.interpret(CaseNode.java:114)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:165)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:142)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:213)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)
        at org.jruby.ast.FCallNoArgNode.interpret(FCallNoArgNode.java:31)
        at org.jruby.ast.NotNode.interpret(NotNode.java:80)
        at org.jruby.ast.AndNode.interpret(AndNode.java:87)
        at org.jruby.ast.WhileNode.interpret(WhileNode.java:124)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at 
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:202)
        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:190)
        at org.jruby.runtime.BlockBody.call(BlockBody.java:64)
        at org.jruby.runtime.Block.call(Block.java:112)
        at org.jruby.RubyProc.call(RubyProc.java:200)
        at org.jruby.RubyProc.call(RubyProc.java:187)
        at 
org.jruby.RubyProc$i_method_0_0$RUBYFRAMEDINVOKER$call.call(org/jruby/RubyProc$i_method_0_0$RUBYFRAMEDINVOKER$call.gen)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodNoBlock.call(JavaMethod.java:62)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:226)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:203)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:73)
        at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at org.jruby.ast.RescueNode.executeBody(RescueNode.java:222)
        at 
org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:144)
        at org.jruby.ast.RescueNode.interpret(RescueNode.java:107)
        at org.jruby.ast.BeginNode.interpret(BeginNode.java:80)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at 
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:202)
        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:190)
        at org.jruby.runtime.Block.yield(Block.java:129)
        at org.jruby.ast.YieldNode.interpret(YieldNode.java:95)
        at org.jruby.ast.IfNode.interpret(IfNode.java:108)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at org.jruby.ast.EnsureNode.interpret(EnsureNode.java:93)
        at org.jruby.ast.BeginNode.interpret(BeginNode.java:80)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:165)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:142)
        at 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:234)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:270)
        at 
org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:100)
        at 
org.jruby.ast.FCallNoArgBlockNode.interpret(FCallNoArgBlockNode.java:31)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
        at org.jruby.ast.WhileNode.interpret(WhileNode.java:128)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at 
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:202)
        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:190)
        at org.jruby.runtime.BlockBody.call(BlockBody.java:64)
        at org.jruby.runtime.Block.call(Block.java:112)
        at org.jruby.RubyProc.call(RubyProc.java:200)
        at org.jruby.RubyProc.call(RubyProc.java:187)
        at 
org.jruby.RubyProc$i_method_0_0$RUBYFRAMEDINVOKER$call.call(org/jruby/RubyProc$i_method_0_0$RUBYFRAMEDINVOKER$call.gen)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodNoBlock.call(JavaMethod.java:62)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:226)
        at 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:203)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:73)
        at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)
        at 
org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:202)
        at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:190)
        at org.jruby.runtime.BlockBody.call(BlockBody.java:64)
        at org.jruby.runtime.Block.call(Block.java:112)
        at org.jruby.RubyProc.call(RubyProc.java:200)
        at org.jruby.RubyProc.call(RubyProc.java:187)
        at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:90)
        at java.lang.Thread.run(Thread.java:619)
{quote}

-- 
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


Reply via email to