[ 
https://jira.nuxeo.com/browse/NXP-8614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Florent Guillaume reassigned NXP-8614:
--------------------------------------

    Assignee: Florent Guillaume

> Infinite loop on high concurrent access to ComplexTypeImpl.getField
> -------------------------------------------------------------------
>
>                 Key: NXP-8614
>                 URL: https://jira.nuxeo.com/browse/NXP-8614
>             Project: Nuxeo Enterprise Platform
>          Issue Type: Bug
>          Components: Core SQL Storage
>    Affects Versions: 5.3.2, 5.4.2, 5.5
>            Reporter: Benoit Delbosc
>            Assignee: Florent Guillaume
>            Priority: Critical
>             Fix For: 5.6
>
>
> On high concurrency access to ComplexTypeImpl.getField can lead to infinite 
> loop on HashMap.get.
> The result is that all thread will be blocked in HashMap.get consuming all 
> CPU without end.
> Looking at a thread dump will show many threads like this
> {code}
> ajp-XXXXX-8009-49" daemon prio=10 tid=0x000000005052a800 nid=0x31c1 runnable 
> [0x0000000048263000]
>    java.lang.Thread.State: RUNNABLE
>       at java.util.HashMap.get(HashMap.java:303)
>       at 
> org.nuxeo.ecm.core.schema.types.ComplexTypeImpl.getField(ComplexTypeImpl.java:103)
>       at 
> org.nuxeo.ecm.core.schema.types.CompositeTypeImpl.getField(CompositeTypeImpl.java:123)
>       at 
> org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.makeProperties(SQLSession.java:846)
>       at 
> org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.makeProperty(SQLSession.java:823)
>       at 
> org.nuxeo.ecm.core.storage.sql.coremodel.SQLComplexProperty.getProperty(SQLComplexProperty.java:119)
>       at 
> org.nuxeo.ecm.core.storage.sql.coremodel.SQLComplexProperty.setPropertyValue(SQLComplexProperty.java:209)
>       at 
> org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.writeDocumentPart(SQLDocumentLive.java:171)
>       at 
> org.nuxeo.ecm.core.api.AbstractSession.writeModel(AbstractSession.java:495)
>       at 
> org.nuxeo.ecm.core.api.AbstractSession.createDocument(AbstractSession.java:816)
>       at 
> org.nuxeo.ecm.core.api.ejb.DocumentManagerBean.createDocument(DocumentManagerBean.java:261)
> {code}
> This happens because HashMap is not thread safe and access should be 
> synchronized.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
ECM-tickets@lists.nuxeo.com
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to