Closed
Bug 827538
Opened 12 years ago
Closed 12 years ago
ConcurrentModificationException in NativeJavaMethod.findCachedFunction
Categories
(Rhino Graveyard :: Core, defect)
Rhino Graveyard
Core
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: kyle.cronin, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11
Steps to reproduce:
Executing a compiled script in a multi-threaded application using Rhino 1.7R4 and Java version 1.6.0_38. The optimization level for the compiled script was set to 9.
Actual results:
Got the following ConcurrentModificationException exception:
Caused by: java.util.ConcurrentModificationException: null
at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761) ~[na:1.6.0_38]
at java.util.LinkedList$ListItr.next(LinkedList.java:696) ~[na:1.6.0_38]
at org.mozilla.javascript.NativeJavaMethod.findCachedFunction(NativeJavaMethod.java:254) ~[rhino-1.7R4.jar:1.7R4]
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:139) ~[rhino-1.7R4.jar:1.7R4]
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) ~[rhino-1.7R4.jar:1.7R4]
at org.mozilla.javascript.gen.Script_id_1__413._c_script_0(Script@id=1 :1) ~[na:na]
at org.mozilla.javascript.gen.Script_id_1__413.call(Script@id=1 ) ~[na:na]
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) ~[rhino-1.7R4.jar:1.7R4]
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) ~[rhino-1.7R4.jar:1.7R4]
at org.mozilla.javascript.gen.Script_id_1__413.call(Script@id=1 ) ~[na:na]
at org.mozilla.javascript.gen.Script_id_1__413.exec(Script@id=1 ) ~[na:na]
Expected results:
the cache lookup loop is not protected by the synchronized block that inserts new entries into 'overloadCache'.
Submitted patch pull request for this issue (and 738388):
https://github.com/mozilla/rhino/pull/103
Comment 2•12 years ago
|
||
Fixed in e83014775c28dc4d884f37023e19b05136b2ac5e
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 3•12 years ago
|
||
I do not believe this is fixed in the rhino-1.7R5-SNAPSHOT.jar that comes with ringojs 0.9.
Comment 4•12 years ago
|
||
Exception in thread "Thread-17" java.util.ConcurrentModificationException
at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
at java.util.LinkedList$ListItr.next(LinkedList.java:696)
at org.mozilla.javascript.NativeJavaMethod.findCachedFunction(NativeJavaMethod.java:254)
at org.mozilla.javascript.NativeJavaClass.construct(NativeJavaClass.java:158)
at org.mozilla.javascript.ScriptRuntime.newObject(ScriptRuntime.java:2349)
You need to log in
before you can comment on or make changes to this bug.
Description
•