ConcurrentModificationException
Posted: 19 Jul 2007, 17:20
Here are two different instances of ConcurrentModificationException we see in the logs. These started showing up after we turned on buddy lists. The first stack trace below is associated with an error message about unable to close client channel, and in our stack trace we are calling disconnectUser from our AS extension script. The second one doesn't have any extension in the stack trace.
====
INFO | jvm 1 | 2007/07/18 00:09:33 | 00:09:33.777 - [ WARNING ] > Unable to close client channel. Error: java.util.ConcurrentModificationException
INFO | jvm 1 | 2007/07/18 00:09:33 | java.util.ConcurrentModificationException
INFO | jvm 1 | 2007/07/18 00:09:33 | at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:09:33 | at java.util.HashMap$KeyIterator.next(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:09:33 | at it.gotoandplay.smartfoxserver.data.BuddyListManager.getClientsToUpdate(BuddyListManager.java:251)
INFO | jvm 1 | 2007/07/18 00:09:33 | at it.gotoandplay.smartfoxserver.data.Zone.removeName(Zone.java:381)
INFO | jvm 1 | 2007/07/18 00:09:33 | at it.gotoandplay.smartfoxserver.SmartFoxServer.lostConnection(SmartFoxServer.java:1497)
INFO | jvm 1 | 2007/07/18 00:09:33 | at it.gotoandplay.smartfoxserver.controllers.SystemHandler.kickUser(SystemHandler.java:2438)
INFO | jvm 1 | 2007/07/18 00:09:33 | at it.gotoandplay.smartfoxserver.extensions.ExtensionHelper.disconnectUser(ExtensionHelper.java:857)
INFO | jvm 1 | 2007/07/18 00:09:33 | at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:09:33 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:09:33 | at java.lang.reflect.Method.invoke(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:142)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:201)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:64)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.gen.c27._c33(thu_challenge.as:687)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.gen.c27.call(thu_challenge.as)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:64)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.gen.c27._c76(thu_challenge.as:1813)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.gen.c27._c72(thu_challenge.as:1458)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.gen.c27.call(thu_challenge.as)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:95)
INFO | jvm 1 | 2007/07/18 00:09:34 | at org.mozilla.javascript.gen.c27._c46(thu_challenge.as:823)
INFO | jvm 1 | 2007/07/18 00:09:34 | at org.mozilla.javascript.gen.c27.call(thu_challenge.as)
INFO | jvm 1 | 2007/07/18 00:09:34 | at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
INFO | jvm 1 | 2007/07/18 00:09:34 | at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
INFO | jvm 1 | 2007/07/18 00:09:34 | at org.mozilla.javascript.gen.c27.call(thu_challenge.as)
INFO | jvm 1 | 2007/07/18 00:09:34 | at it.gotoandplay.smartfoxserver.extensions.JavascriptExtension.callJavaScriptFunction(JavascriptExtension.java:443)
INFO | jvm 1 | 2007/07/18 00:09:34 | at it.gotoandplay.smartfoxserver.extensions.JavascriptExtension.handleRequest(JavascriptExtension.java:250)
INFO | jvm 1 | 2007/07/18 00:09:34 | at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.processEvent(ExtensionHandler.java:488)
INFO | jvm 1 | 2007/07/18 00:09:34 | at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.run(ExtensionHandler.java:378)
INFO | jvm 1 | 2007/07/18 00:09:34 | at java.lang.Thread.run(Unknown Source)
=== Stack trace #2 ===
INFO | jvm 1 | 2007/07/18 00:02:50 | 00:02:50.459 - [ WARNING ] > Unexpected Exception: java.util.ConcurrentModificationException
INFO | jvm 1 | 2007/07/18 00:02:50 | java.util.ConcurrentModificationException
INFO | jvm 1 | 2007/07/18 00:02:50 | at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:02:50 | at java.util.HashMap$KeyIterator.next(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:02:50 | at it.gotoandplay.smartfoxserver.data.BuddyListManager.getClientsToUpdate(BuddyListManager.java:251)
INFO | jvm 1 | 2007/07/18 00:02:50 | at it.gotoandplay.smartfoxserver.controllers.SystemHandler.handleSetBuddyVars(SystemHandler.java:1833)
INFO | jvm 1 | 2007/07/18 00:02:50 | at it.gotoandplay.smartfoxserver.controllers.SystemHandler.processEvent(SystemHandler.java:280)
INFO | jvm 1 | 2007/07/18 00:02:50 | at it.gotoandplay.smartfoxserver.controllers.SystemHandler.run(SystemHandler.java:121)
INFO | jvm 1 | 2007/07/18 00:02:50 | at java.lang.Thread.run(Unknown Source)
====
INFO | jvm 1 | 2007/07/18 00:09:33 | 00:09:33.777 - [ WARNING ] > Unable to close client channel. Error: java.util.ConcurrentModificationException
INFO | jvm 1 | 2007/07/18 00:09:33 | java.util.ConcurrentModificationException
INFO | jvm 1 | 2007/07/18 00:09:33 | at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:09:33 | at java.util.HashMap$KeyIterator.next(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:09:33 | at it.gotoandplay.smartfoxserver.data.BuddyListManager.getClientsToUpdate(BuddyListManager.java:251)
INFO | jvm 1 | 2007/07/18 00:09:33 | at it.gotoandplay.smartfoxserver.data.Zone.removeName(Zone.java:381)
INFO | jvm 1 | 2007/07/18 00:09:33 | at it.gotoandplay.smartfoxserver.SmartFoxServer.lostConnection(SmartFoxServer.java:1497)
INFO | jvm 1 | 2007/07/18 00:09:33 | at it.gotoandplay.smartfoxserver.controllers.SystemHandler.kickUser(SystemHandler.java:2438)
INFO | jvm 1 | 2007/07/18 00:09:33 | at it.gotoandplay.smartfoxserver.extensions.ExtensionHelper.disconnectUser(ExtensionHelper.java:857)
INFO | jvm 1 | 2007/07/18 00:09:33 | at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:09:33 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:09:33 | at java.lang.reflect.Method.invoke(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:142)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:201)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:64)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.gen.c27._c33(thu_challenge.as:687)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.gen.c27.call(thu_challenge.as)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:64)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.gen.c27._c76(thu_challenge.as:1813)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.gen.c27._c72(thu_challenge.as:1458)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.gen.c27.call(thu_challenge.as)
INFO | jvm 1 | 2007/07/18 00:09:33 | at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:95)
INFO | jvm 1 | 2007/07/18 00:09:34 | at org.mozilla.javascript.gen.c27._c46(thu_challenge.as:823)
INFO | jvm 1 | 2007/07/18 00:09:34 | at org.mozilla.javascript.gen.c27.call(thu_challenge.as)
INFO | jvm 1 | 2007/07/18 00:09:34 | at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
INFO | jvm 1 | 2007/07/18 00:09:34 | at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
INFO | jvm 1 | 2007/07/18 00:09:34 | at org.mozilla.javascript.gen.c27.call(thu_challenge.as)
INFO | jvm 1 | 2007/07/18 00:09:34 | at it.gotoandplay.smartfoxserver.extensions.JavascriptExtension.callJavaScriptFunction(JavascriptExtension.java:443)
INFO | jvm 1 | 2007/07/18 00:09:34 | at it.gotoandplay.smartfoxserver.extensions.JavascriptExtension.handleRequest(JavascriptExtension.java:250)
INFO | jvm 1 | 2007/07/18 00:09:34 | at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.processEvent(ExtensionHandler.java:488)
INFO | jvm 1 | 2007/07/18 00:09:34 | at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.run(ExtensionHandler.java:378)
INFO | jvm 1 | 2007/07/18 00:09:34 | at java.lang.Thread.run(Unknown Source)
=== Stack trace #2 ===
INFO | jvm 1 | 2007/07/18 00:02:50 | 00:02:50.459 - [ WARNING ] > Unexpected Exception: java.util.ConcurrentModificationException
INFO | jvm 1 | 2007/07/18 00:02:50 | java.util.ConcurrentModificationException
INFO | jvm 1 | 2007/07/18 00:02:50 | at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:02:50 | at java.util.HashMap$KeyIterator.next(Unknown Source)
INFO | jvm 1 | 2007/07/18 00:02:50 | at it.gotoandplay.smartfoxserver.data.BuddyListManager.getClientsToUpdate(BuddyListManager.java:251)
INFO | jvm 1 | 2007/07/18 00:02:50 | at it.gotoandplay.smartfoxserver.controllers.SystemHandler.handleSetBuddyVars(SystemHandler.java:1833)
INFO | jvm 1 | 2007/07/18 00:02:50 | at it.gotoandplay.smartfoxserver.controllers.SystemHandler.processEvent(SystemHandler.java:280)
INFO | jvm 1 | 2007/07/18 00:02:50 | at it.gotoandplay.smartfoxserver.controllers.SystemHandler.run(SystemHandler.java:121)
INFO | jvm 1 | 2007/07/18 00:02:50 | at java.lang.Thread.run(Unknown Source)