Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0036574 | Openbravo ERP | Y. DBSourceManager | public | 2017-08-02 10:03 | 2017-08-03 13:05 | |||||||
Reporter | alostale | |||||||||||
Assigned To | alostale | |||||||||||
Priority | immediate | Severity | major | Reproducibility | random | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | 3.0PR17Q3 | Fixed in Version | 3.0PR17Q3 | |||||||||
Merge Request Status | ||||||||||||
Review Assigned To | AugustoMauch | |||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | QA functional test | |||||||||||
Regression date | 2017-05-25 | |||||||||||
Regression introduced in release | main | |||||||||||
Regression introduced by commit | http://code.openbravo.com/erp/devel/pi/rev/49ac427a0d6689181afa29b95d7384f78eab2dca [^] | |||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0036574: import sample data can get stuck when executed by multiple threads | |||||||||||
Description | Importing sample data concurrently with several threads can cause locks at JVM level due to usage of non thread safe internal caches. This behavior is unlike to occur, but if it happens, import sample data process lasts forever. | |||||||||||
Steps To Reproduce | Within a multi-core run: ant install.source Randomly it can get stuck at importing sample data step. Checking stack traces (jstack): "pool-1-thread-2" prio=10 tid=0x00007fac2c83f800 nid=0x4c3a runnable [0x00007fac2203f000] java.lang.Thread.State: RUNNABLE at java.util.HashMap.getEntry(HashMap.java:465) at java.util.HashMap.get(HashMap.java:417) at org.apache.ddlutils.dynabean.DynaClassCache.getDynaClass(DynaClassCache.java:99) at org.apache.ddlutils.dynabean.DynaClassCache.createNewInstance(DynaClassCache.java:50) at org.apache.ddlutils.model.Database.createDynaBeanFor(Database.java:1342) at org.apache.ddlutils.io.DynaSqlCreateRule.begin(DynaSqlCreateRule.java:61) at org.apache.commons.digester.Digester.startElement(Digester.java:1464) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1743) at org.apache.ddlutils.io.DatabaseDataIO.writeDataToDatabase(DatabaseDataIO.java:722) at org.openbravo.ddlutils.task.ImportSampledata$ImportRunner.importXmlFile(ImportSampledata.java:357) at org.openbravo.ddlutils.task.ImportSampledata$ImportRunner.run(ImportSampledata.java:340) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) "pool-1-thread-1" prio=10 tid=0x00007fac2c83f000 nid=0x4c39 runnable [0x00007fac2213f000] java.lang.Thread.State: RUNNABLE at java.util.HashMap.put(HashMap.java:494) at org.apache.ddlutils.dynabean.DynaClassCache.getDynaClass(DynaClassCache.java:103) at org.apache.ddlutils.dynabean.DynaClassCache.createNewInstance(DynaClassCache.java:50) at org.apache.ddlutils.model.Database.createDynaBeanFor(Database.java:1342) at org.apache.ddlutils.io.DynaSqlCreateRule.begin(DynaSqlCreateRule.java:61) at org.apache.commons.digester.Digester.startElement(Digester.java:1464) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1743) at org.apache.ddlutils.io.DatabaseDataIO.writeDataToDatabase(DatabaseDataIO.java:722) at org.openbravo.ddlutils.task.ImportSampledata$ImportRunner.importXmlFile(ImportSampledata.java:357) at org.openbravo.ddlutils.task.ImportSampledata$ImportRunner.run(ImportSampledata.java:340) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Both threads are manipulating the same HashMap concurrently causing, in some cases, infinite loop. | |||||||||||
Proposed Solution | ||||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2017-08-02 10:05 | alostale | Type | defect => backport | |||||||||
2017-08-02 10:05 | alostale | Target Version | => 3.0PR17Q3 | |||||||||
2017-08-02 10:33 | hgbot | Checkin | ||||||||||
2017-08-02 10:33 | hgbot | Note Added: 0098324 | ||||||||||
2017-08-02 10:33 | hgbot | Status | scheduled => resolved | |||||||||
2017-08-02 10:33 | hgbot | Resolution | open => fixed | |||||||||
2017-08-02 10:33 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/backports/3.0PR17Q3/rev/fb946104af617509960447687aae64907670e51a [^] | |||||||||
2017-08-02 10:34 | alostale | Review Assigned To | => AugustoMauch | |||||||||
2017-08-03 13:05 | AugustoMauch | Note Added: 0098363 | ||||||||||
2017-08-03 13:05 | AugustoMauch | Status | resolved => closed | |||||||||
2017-08-03 13:05 | AugustoMauch | Fixed in Version | => 3.0PR17Q3 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|