Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0039005 | Openbravo ERP | A. Platform | public | 2018-07-20 08:13 | 2018-08-08 13:06 |
|
Reporter | alostale | |
Assigned To | alostale | |
Priority | urgent | Severity | major | Reproducibility | random |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR18Q4 | |
Merge Request Status | |
Review Assigned To | caristu |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0039005: 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. |
Additional Information | |
Tags | No tags attached. |
Relationships | depends on | backport | 0039006 | 3.0PR18Q3 | closed | alostale | BaseComponentProvider is not thread safe | depends on | backport | 0039007 | 3.0PR18Q2.2 | closed | alostale | BaseComponentProvider is not thread safe | blocks | design defect | 0034664 | | acknowledged | Triage Platform Base | multi thread unsafeties |
|
Attached Files | pos-loading-error.png (34,316) 2018-07-20 08:15 https://issues.openbravo.com/file_download.php?file_id=11986&type=bug
|
|
Issue History |
Date Modified | Username | Field | Change |
2018-07-20 08:13 | alostale | New Issue | |
2018-07-20 08:13 | alostale | Assigned To | => alostale |
2018-07-20 08:13 | alostale | Modules | => Core |
2018-07-20 08:13 | alostale | Triggers an Emergency Pack | => No |
2018-07-20 08:13 | alostale | Review Assigned To | => caristu |
2018-07-20 08:13 | alostale | Relationship added | blocks 0034664 |
2018-07-20 08:15 | alostale | File Added: pos-loading-error.png | |
2018-07-20 08:33 | alostale | Status | new => scheduled |
2018-07-20 08:34 | hgbot | Checkin | |
2018-07-20 08:34 | hgbot | Note Added: 0105817 | |
2018-07-20 08:34 | hgbot | Checkin | |
2018-07-20 08:34 | hgbot | Note Added: 0105818 | |
2018-07-20 08:34 | hgbot | Status | scheduled => resolved |
2018-07-20 08:34 | hgbot | Resolution | open => fixed |
2018-07-20 08:34 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/abf1220478484730722610844010ccd09671897a [^] |
2018-07-24 10:40 | hgbot | Checkin | |
2018-07-24 10:40 | hgbot | Note Added: 0105852 | |
2018-07-27 10:27 | caristu | Note Added: 0105972 | |
2018-07-27 10:27 | caristu | Status | resolved => closed |
2018-07-27 10:27 | caristu | Fixed in Version | => 3.0PR18Q4 |
2018-08-08 13:06 | hudsonbot | Checkin | |
2018-08-08 13:06 | hudsonbot | Note Added: 0106214 | |
2018-08-08 13:06 | hudsonbot | Checkin | |
2018-08-08 13:06 | hudsonbot | Note Added: 0106215 | |
2018-08-08 13:06 | hudsonbot | Checkin | |
2018-08-08 13:06 | hudsonbot | Note Added: 0106218 | |
Notes |
|
(0105817)
|
hgbot
|
2018-07-20 08:34
|
|
Repository: erp/devel/pi
Changeset: 7c8fe974bb457fabd559cf90b1a234370f3d40a6
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jul 20 08:28:38 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7c8fe974bb457fabd559cf90b1a234370f3d40a6 [^]
related to bug 39005: added log
Added verbose debug log to StaticResourceComponent, to be able to trace issues
when generating resources.
---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceComponent.java
---
|
|
|
(0105818)
|
hgbot
|
2018-07-20 08:34
|
|
Repository: erp/devel/pi
Changeset: abf1220478484730722610844010ccd09671897a
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jul 20 08:30:59 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/abf1220478484730722610844010ccd09671897a [^]
fixed bug 39005: 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
---
|
|
|
(0105852)
|
hgbot
|
2018-07-24 10:40
|
|
Repository: erp/devel/pi
Changeset: e2c56d84d26d474602c490bef52dc2ffb93cf343
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Jul 24 10:39:37 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e2c56d84d26d474602c490bef52dc2ffb93cf343 [^]
related to issue 39005: minor code improvements
- Can directly return the createComponentResource result
- Use diamond operator
---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponentProvider.java
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|