You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Marcel Offermans (JIRA)" <ji...@apache.org> on 2013/01/15 11:22:19 UTC
[jira] [Resolved] (FELIX-3402) DependencyManager stop can trigger
IndexOutOfBoundsException
[ https://issues.apache.org/jira/browse/FELIX-3402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marcel Offermans resolved FELIX-3402.
-------------------------------------
Resolution: Fixed
Reviewed the patch, applied it in a slightly modified way:
- using an array instead of a (more expensive) LinkedList;
- not using getComponent but synchronizing on the list directly.
The big question however is, if this happens, who was modifying this list and can this fix have a side effect in that scenario that leaves double or not stopped components dangling. That's not necessarily something in scope for this fix though.
> DependencyManager stop can trigger IndexOutOfBoundsException
> ------------------------------------------------------------
>
> Key: FELIX-3402
> URL: https://issues.apache.org/jira/browse/FELIX-3402
> Project: Felix
> Issue Type: Bug
> Components: Dependency Manager
> Affects Versions: dependencymanager-3.0.0
> Reporter: Bram de Kruijff
> Assignee: Marcel Offermans
> Attachments: FELIX-3402-sync.patch
>
>
> DependencyManager.clear(), pre FELIX-3042 known as DependencyActivatorBase.cleanup(), iterates over unprotected list determining size only at the start.
> {code}
> build 22-Mar-2012 10:03:08 java.lang.IndexOutOfBoundsException: Index: 66, Size: 66
> build 22-Mar-2012 10:03:08 at java.util.ArrayList.RangeCheck(ArrayList.java:547)
> build 22-Mar-2012 10:03:08 at java.util.ArrayList.get(ArrayList.java:322)
> build 22-Mar-2012 10:03:08 at java.util.Collections$SynchronizedList.get(Collections.java:1816)
> build 22-Mar-2012 10:03:08 at java.util.Collections$UnmodifiableList.get(Collections.java:1154)
> build 22-Mar-2012 10:03:08 at org.apache.felix.dm.DependencyActivatorBase.cleanup(DependencyActivatorBase.java:301)
> build 22-Mar-2012 10:03:08 at org.apache.felix.dm.DependencyActivatorBase.stop(DependencyActivatorBase.java:90)
> build 22-Mar-2012 10:03:08 at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:663)
> build 22-Mar-2012 10:03:08 at org.apache.felix.framework.Felix.stopBundle(Felix.java:2361)
> build 22-Mar-2012 10:03:08 at org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:980)
> build 22-Mar-2012 10:03:08 at org.apache.felix.framework.BundleImpl.stop(BundleImpl.java:967)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira