Openbravo Issue Tracking System - Openbravo ERP | |||||||||||||||||||
View Issue Details | |||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||||||||
0037015 | Openbravo ERP | A. Platform | public | 2017-10-05 16:58 | 2017-11-29 10:34 | ||||||||||||||
Reporter | alostale | ||||||||||||||||||
Assigned To | alostale | ||||||||||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||||||||||
Status | closed | Resolution | fixed | ||||||||||||||||
Platform | OS | 5 | OS Version | ||||||||||||||||
Product Version | |||||||||||||||||||
Target Version | Fixed in Version | 3.0PR18Q1 | |||||||||||||||||
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 | 0037015: contention in DAL proxies with high concurrency | ||||||||||||||||||
Description | Whenever a Hibernate proxied object is accessed to any of its methods, even if it is already hydrated, a lock is created at entity's method level, so it is only possible to access this method once a time even in different instances. For example: Thread 1 Module modInstance1 = OBDal.getInstance().get(Module.class, "0"); Client clientProxyInstance1 = modInstance1.getClient(); // we have a proxy clientProxyInstance1.getId(); // accessing to a method in the proxy Thread 2 Module modInstance2 = OBDal.getInstance().get(Module.class, "0"); // another Module instance Client clientProxyInstance2 = modInstance1.getClient(); // another proxy instance clientProxyInstance2.getId(); // accessing to a method in the proxy In this example, clientProxyInstance1.getId() and clientProxyInstance2.getId() cannot be executed concurrently because both of them try to get a lock on Client.getId method. | ||||||||||||||||||
Steps To Reproduce | -Execute attached test profiling locks and monitors -> See attached image where it can be seen threads waiting for RuntimeSupport.find2Methods | ||||||||||||||||||
Proposed Solution | This is an issue [1] in the javassist version that currently Openbravo depends on (3.14.0-GA), which is fixed since 3.17.0-GA. Decide to which version update, maybe to 3.20.0-GA, which is not the latest one but the one currently Hibernate depends on [2]. Note 3.17 seems to be buggy an Hibernate moved from it [3][4]. Testing with 3.20.0-GA solves the contention issue (see attached image) which is the same test execution without any thread waiting. --- [1] https://issues.jboss.org/browse/JASSIST-163 [^] [2] https://github.com/hibernate/hibernate-orm/blob/00492a3707b9128b34646166f6eff402a8169011/libraries.gradle#L20 [^] [3] https://hibernate.atlassian.net/browse/HHH-7923 [^] [4] https://issues.jboss.org/browse/JASSIST-189 [^] | ||||||||||||||||||
Additional Information | |||||||||||||||||||
Tags | Performance | ||||||||||||||||||
Relationships |
| ||||||||||||||||||
Attached Files | Selection_214.png (78,055) 2017-10-05 17:04 https://issues.openbravo.com/file_download.php?file_id=11139&type=bug DalProxyConcurrency.java (2,013) 2017-10-05 17:11 https://issues.openbravo.com/file_download.php?file_id=11140&type=bug Same-Test-New-Jar.png (17,673) 2017-10-05 17:20 https://issues.openbravo.com/file_download.php?file_id=11141&type=bug | ||||||||||||||||||
Issue History | |||||||||||||||||||
Date Modified | Username | Field | Change | ||||||||||||||||
2017-10-05 16:58 | alostale | New Issue | |||||||||||||||||
2017-10-05 16:58 | alostale | Assigned To | => platform | ||||||||||||||||
2017-10-05 16:58 | alostale | Modules | => Core | ||||||||||||||||
2017-10-05 16:58 | alostale | Triggers an Emergency Pack | => No | ||||||||||||||||
2017-10-05 17:04 | alostale | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=16033#r16033 | ||||||||||||||||
2017-10-05 17:04 | alostale | File Added: Selection_214.png | |||||||||||||||||
2017-10-05 17:10 | alostale | Proposed Solution updated | |||||||||||||||||
2017-10-05 17:11 | alostale | File Added: DalProxyConcurrency.java | |||||||||||||||||
2017-10-05 17:17 | alostale | Proposed Solution updated | |||||||||||||||||
2017-10-05 17:18 | alostale | Proposed Solution updated | |||||||||||||||||
2017-10-05 17:19 | shuehner | Issue Monitored: shuehner | |||||||||||||||||
2017-10-05 17:20 | alostale | File Added: Same-Test-New-Jar.png | |||||||||||||||||
2017-10-05 17:21 | alostale | Proposed Solution updated | |||||||||||||||||
2017-10-05 17:26 | alostale | Tag Attached: Performance | |||||||||||||||||
2017-10-06 10:42 | alostale | Relationship added | related to 0020515 | ||||||||||||||||
2017-10-06 11:16 | alostale | Status | new => acknowledged | ||||||||||||||||
2017-10-13 12:40 | alostale | Relationship added | related to 0037064 | ||||||||||||||||
2017-11-21 10:26 | hgbot | Checkin | |||||||||||||||||
2017-11-21 10:26 | hgbot | Note Added: 0100644 | |||||||||||||||||
2017-11-21 10:26 | hgbot | Status | acknowledged => resolved | ||||||||||||||||
2017-11-21 10:26 | hgbot | Resolution | open => fixed | ||||||||||||||||
2017-11-21 10:26 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/34f3cf610264a9eb4342f421f67d179d4cbdfa7d [^] | ||||||||||||||||
2017-11-21 10:26 | alostale | Assigned To | platform => alostale | ||||||||||||||||
2017-11-21 10:27 | alostale | Review Assigned To | => caristu | ||||||||||||||||
2017-11-29 10:34 | caristu | Note Added: 0100804 | |||||||||||||||||
2017-11-29 10:34 | caristu | Status | resolved => closed | ||||||||||||||||
2017-11-29 10:34 | caristu | Fixed in Version | => 3.0PR18Q1 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|