Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0039007 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] A. Platform | major | random | 2018-07-20 08:13 | 2018-07-27 10:28 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR18Q2.2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 50cdb7ce18be | ||||
Projection | none | ETA | none | Target Version | 3.0PR18Q2.2 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0039007: BaseComponentProvider is not thread safe | |||||||
Description | BaseComponentProvider has a field (appDependencies) which is thread unsafe. This static field is a HashMap which is not thread safe, it is generally initialized by different ComponentProviders in their static initializers for example in MobileCoreComponentProvider: static { // Set dependency on Mobile Core app BaseComponentProvider.setAppDependencies(MobileCoreConstants.RETAIL_CORE, Arrays.asList(MobileCoreConstants.APP_IDENTIFIER)); } If two different threads execute static initializer of different ComponentProviders concurrently, the contents of this field can be uncertain. | |||||||
Steps To Reproduce | Unclear and random. It could cause the following problem: 1. In an instance with retail 2. Load login page -> ERROR: Nothing is loaded an error page is seen saying "The WebPOS cannot be loaded" This can occur the first time login page is loaded. If it occurs, WebPOS won't be loadable till Tomcat is restarted, if it does not occur 1st load, subsequent ones will continue working. See https://ci.openbravo.com/view/try-retail/job/try-ret-test-pgsql-suite8/4853/artifact/SANDBOX/automation/pi-mobile/last-results/try-ret-test-pgsql-suite8/screenshots/15%3A01%3A44%20FAILED%3A%20ATT010_AttributesLayaways.png [^] | |||||||
Proposed Solution | Change appDependencies from HashMap to ConcurrentHashMap. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | ||||||||
|
Notes | |
(0105820) hgbot (developer) 2018-07-20 08:57 |
Repository: erp/backports/3.0PR18Q2.2 Changeset: 50cdb7ce18beb7aac148724ab47ac8afe708c780 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Fri Jul 20 08:30:59 2018 +0200 URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.2/rev/50cdb7ce18beb7aac148724ab47ac8afe708c780 [^] fixed bug 39007: BaseComponentProvider is not thread safe Static appDependencies has been changed from HashMap to ConcurrentHashMap, this field can potentially be concurrently initialized from several classes being HashMap not thread safe can lead to inconsistent results. --- M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponentProvider.java --- |
(0105974) caristu (developer) 2018-07-27 10:28 |
Code reviewed |
Issue History | |||
Date Modified | Username | Field | Change |
2018-07-20 08:33 | alostale | Type | defect => backport |
2018-07-20 08:33 | alostale | Target Version | => 3.0PR18Q2.2 |
2018-07-20 08:57 | hgbot | Checkin | |
2018-07-20 08:57 | hgbot | Note Added: 0105820 | |
2018-07-20 08:57 | hgbot | Status | scheduled => resolved |
2018-07-20 08:57 | hgbot | Resolution | open => fixed |
2018-07-20 08:57 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/backports/3.0PR18Q2.2/rev/50cdb7ce18beb7aac148724ab47ac8afe708c780 [^] |
2018-07-27 10:28 | caristu | Note Added: 0105974 | |
2018-07-27 10:28 | caristu | Status | resolved => closed |
2018-07-27 10:28 | caristu | Fixed in Version | => 3.0PR18Q2.2 |
Copyright © 2000 - 2009 MantisBT Group |