[infinispan-issues] [JBoss JIRA] (ISPN-2796) ConcurrentCacheManagerTest.testConcurrentGetCacheCalls hangs the test suite (randomly)

Dan Berindei (JIRA) jira-events at lists.jboss.org
Tue Feb 12 08:30:56 EST 2013


    [ https://issues.jboss.org/browse/ISPN-2796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753657#comment-12753657 ] 

Dan Berindei commented on ISPN-2796:
------------------------------------

I found the problem: AbstractComponentRegistry.registerComponentInternal() injects dependencies only after the component is already in the componentLookup map in order to support cyclical dependencies. But all the "read" methods of AbstractComponentRegistry are not synchronized, so it's possible for other threads to read the component from the map before it has been initialized.

You can reproduce the NullPointerException every single time, if you add a {{Thread.sleep(100)}} call at the beginning of {{AbstractComponentFactory.injectGlobalDependencies()}}.

[~mircea.markus] I think we should probably create a new JIRA to make it clear that the problem is in {{AbstractComponentRegistry}} and we should also write a separate test for it (e.g. using a component that calls {{Thread.sleep()}} in its {{@Inject}} method).

                
> ConcurrentCacheManagerTest.testConcurrentGetCacheCalls hangs the test suite (randomly)
> --------------------------------------------------------------------------------------
>
>                 Key: ISPN-2796
>                 URL: https://issues.jboss.org/browse/ISPN-2796
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Test Suite
>    Affects Versions: 5.2.0.Final
>            Reporter: Adrian Nistor
>            Assignee: Mircea Markus
>             Fix For: 5.2.2, 5.3.0.Alpha1
>
>         Attachments: ConcurrentCacheManagerTest.log, stack.log
>
>


--
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 infinispan-issues mailing list