[
https://issues.apache.org/jira/browse/TOMEE-1622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659698#comment-14659698
]
ASF GitHub Bot commented on TOMEE-1622:
---------------------------------------
GitHub user kasunbg opened a pull request:
https://github.com/apache/tomee/pull/18
TOMEE-1622 - SystemInstance unsafely iterates over the
System.getProperties()
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kasunbg/tomee TOMEE-1622
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tomee/pull/18.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #18
----
commit 476461a07868339f1b0aa8a6e240a63e3602447b
Author: Kasun Gajasinghe <[email protected]>
Date: 2015-08-06T08:52:33Z
TOMEE-1622 - TomEE SystemInstance unsafely iterates over the
System.getProperties()
----
> TomEE SystemInstance unsafely iterates over the System.getProperties()
> ----------------------------------------------------------------------
>
> Key: TOMEE-1622
> URL: https://issues.apache.org/jira/browse/TOMEE-1622
> Project: TomEE
> Issue Type: Bug
> Affects Versions: 1.7.2
> Environment: Linux
> Reporter: Kasun Gajasinghe
> Fix For: 1.7.3
>
>
> This is discussed @tomee-dev
> http://tomee-openejb.979440.n4.nabble.com/TomEE-SystemInstance-unsafely-iterates-over-the-System-getProperties-td4675732.html
> We've been seeing the following exception [2] in an instance where we have
> extended TomEE 1.7.2. We have debugged the issue, and it seems to have
> occurred since TomEE iterate over the System.getProperties() hashtable [1].
> It's possible that other threads might be using the system properties which
> could lead to ConcurrentModificationException.
> Best way fix thing would to create a clone of the system properties, and use
> that clone to iterate. There are issues reported for unsafe iterating of
> system properties in other projects as seen in [3].
> Can we get this fixed in TomEE 1.7.3?
> [1]
> https://github.com/apache/tomee/blob/tomee-1.7.x/container/openejb-loader/src/main/java/org/apache/openejb/loader/SystemInstance.java#L71
> [2]
> org.apache.openejb.loader.LoaderRuntimeException: Failed to create default
> instance of SystemInstance
> at org.apache.openejb.loader.SystemInstance.reset(SystemInstance.java:280)
> at org.apache.openejb.loader.SystemInstance.<clinit>(SystemInstance.java:265)
> ... 9 more
> Caused by: java.util.ConcurrentModificationException
> at java.util.Hashtable$Enumerator.next(Hashtable.java:1167)
> at org.apache.openejb.loader.SystemInstance.<init>(SystemInstance.java:71)
> at org.apache.openejb.loader.SystemInstance.reset(SystemInstance.java:277)
> ... 10 more
> [3]
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=469706
> https://liquibase.jira.com/browse/CORE-2104
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)