[
https://jira.nuxeo.com/browse/NXP-8614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Florent Guillaume resolved NXP-8614.
------------------------------------
Resolution: Fixed
Fix Version/s: 5.4.2-HF16
To avoid possibly concurrent access to the HashMap, the "cache" has been
redesigned and everything is computed on object construction (or a bit lazily
on first access).
master:
https://github.com/nuxeo/nuxeo-core/commit/08a8afa1afde2b0a73bd65861ca65953b4815a2b
5.5.0:
https://github.com/nuxeo/nuxeo-core/commit/516359c9261fef539623bf2077084ca8b4b2f4a2
5.4.2:
https://github.com/nuxeo/nuxeo-core/commit/bdef19cae6d328b63e2b147a09f5f4e899743510
1.6.2:
https://github.com/nuxeo/nuxeo-core/commit/9f2c1387c50f76d89e39305cdce0010b96f6611d
> 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.4.2-HF16, 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
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets