Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0037015 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
design defect | [Openbravo ERP] A. Platform | minor | have not tried | 2017-10-05 16:58 | 2017-11-29 10:34 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR18Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 34f3cf610264 | ||||
Projection | none | ETA | none | Target Version | ||||
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 | 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 [^] | |||||||
Tags | Performance | |||||||
Attached Files | Selection_214.png [^] (78,055 bytes) 2017-10-05 17:04
DalProxyConcurrency.java [^] (2,013 bytes) 2017-10-05 17:11 Same-Test-New-Jar.png [^] (17,673 bytes) 2017-10-05 17:20 | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||
|
Notes | |
(0100644) hgbot (developer) 2017-11-21 10:26 |
Repository: erp/devel/pi Changeset: 34f3cf610264a9eb4342f421f67d179d4cbdfa7d Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Mon Nov 13 13:52:55 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/34f3cf610264a9eb4342f421f67d179d4cbdfa7d [^] fixed 37015: contention in DAL proxies with high concurrency Updated javassisit library from 3.14.0-GA to 3.20.0-GA to solve JASSIST-163: RuntimeSupport.find2Methods perf hotspot when proxy's methods are called at higher concurrency [1]. [1] https://issues.jboss.org/browse/JASSIST-163 [^] --- M legal/Licensing.txt A lib/runtime/javassist-3.20.0-GA.jar R lib/runtime/javassist-3.14.0-GA.jar --- |
(0100804) caristu (developer) 2017-11-29 10:34 |
Reviewed Updated wiki page: http://wiki.openbravo.com/wiki/Openbravo_Libraries [^] |
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 | View Revisions |
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 |
Copyright © 2000 - 2009 MantisBT Group |