[
https://issues.apache.org/jira/browse/FELIX-4728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14243903#comment-14243903
]
Niels Beekman commented on FELIX-4728:
--------------------------------------
No, unfortunately. We encountered this issue only once after months in
production.
However, if you have tests for the InstanceManager, you should be able to just
let a number of threads access onEntry concurrently to reproduce.
A simple fix would be to use "private Map m_methods =
Collections.synchronizedMap(new HashMap());" or use ConcurrentHashMap if
possible, or synchronize getMethodById entirely.
For a detailed explanation of this race condition, see
http://mailinator.blogspot.nl/2009/06/beautiful-race-condition.html.
> InstanceManager concurrency issue
> ---------------------------------
>
> Key: FELIX-4728
> URL: https://issues.apache.org/jira/browse/FELIX-4728
> Project: Felix
> Issue Type: Bug
> Components: iPOJO
> Affects Versions: ipojo-runtime-1.11.2
> Reporter: Niels Beekman
> Assignee: Clement Escoffier
>
> We observed a race condition in InstanceManager.onEntry. This is caused by
> improperly synchronized access on a HashMap. Unlike reported in FELIX-3500,
> we did not get an exception, but high cpu usage due to the data race. See the
> relevant thread stacks in the comments.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)