java.util.ConcurrentModificationException still occurs
------------------------------------------------------
Key: JRUBY-5651
URL: http://jira.codehaus.org/browse/JRUBY-5651
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Reporter: Olaf Sammler
Assignee: Charles Oliver Nutter
While creating some clean Ruby instances in a Timer through Ruby.newInstance(),
I get randomly this exception:
[#|2008-04-14T17:16:50.866+0200|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=19;_ThreadName=Timer-6;_RequestID=fd1a3bbc-2afe-4c1e-9e4e-cfefeaa1d664;|java.util.ConcurrentModificationException
at java.util.Hashtable$Enumerator.next(Hashtable.java:1020)
at
org.jruby.environment.OSEnvironment.getAsMapOfRubyStrings(OSEnvironment.java:144)
at
org.jruby.environment.OSEnvironment.getSystemPropertiesMap(OSEnvironment.java:120)
at org.jruby.RubyGlobal.defineGlobalEnvConstants(RubyGlobal.java:255)
at org.jruby.RubyGlobal.createGlobals(RubyGlobal.java:212)
at org.jruby.Ruby.init(Ruby.java:833)
at org.jruby.Ruby.newInstance(Ruby.java:157)
at org.jruby.Ruby.newInstance(Ruby.java:145)
at
com.unient.engine.core.runtime.cache.RubyRuntimeCache$RubyRuntimeCreatorTask.run(RubyRuntimeCache.java:602)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
The problem is in iteration of System properties entrySet. Iteration on this
entrySet is not threadsafe, since any other apllication can be writing to
system properties at the same time.
--
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