[jboss-osgi-issues] [JBoss JIRA] (JBOSGI-615) VFSAdaptor30 uses non-thread-safe Map, which may result in deadlock
Thomas Diesler (JIRA)
jira-events at lists.jboss.org
Thu Nov 29 15:20:21 EST 2012
[ https://issues.jboss.org/browse/JBOSGI-615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12738259#comment-12738259 ]
Thomas Diesler commented on JBOSGI-615:
---------------------------------------
https://github.com/jbossas/jboss-as/pull/3546
> VFSAdaptor30 uses non-thread-safe Map, which may result in deadlock
> -------------------------------------------------------------------
>
> Key: JBOSGI-615
> URL: https://issues.jboss.org/browse/JBOSGI-615
> Project: JBoss OSGi
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Core Framework
> Affects Versions: JBossOSGi 1.1.1, JBossOSGi 1.2.0, JBossOSGi 2.0.0 Beta1
> Environment: all
> Reporter: Rico Neubauer
> Assignee: Thomas Diesler
> Fix For: JBossOSGi 1.2.0
>
> Attachments: jstack_HashMapBugOSGi_vfs.txt
>
>
> org.jboss.osgi.vfs30.VFSAdaptor30 uses a WeakHashMap, which is unsynchronized. However concurrent access may happen, at least in method org.jboss.osgi.vfs30.VFSAdaptor30#unregister().
> This may result in a complete deadlock of the application with 100% CPU load, which cannot be resolved besides killing the java-process.
> See attached thread-dump.
> Possible solutions:
> - Use synchronized Map.
> - Use concurrent, thread-safe map.
> - If unregister is the only potential concurrent access, synchronizing there would suffice.
--
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
More information about the jboss-osgi-issues
mailing list