Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029967
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] A. Platformmajoralways2015-05-21 17:532022-02-01 08:09
ReporterioritzCiaView Statuspublic 
Assigned ToTriage Platform Base 
PriorityhighResolutionopenFixed in Version
StatusacknowledgedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabaseOracleJava version6
OS VersionUbuntu 14.04Database version11gAnt version
Product Version3.0PR15Q1.3SCM revision 
Review Assigned To
Web browserGoogle Chrome
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029967: Hibernate makes tomcat to block many concurrent DAL calls

DescriptionIn a development which makes a lot of concurrent DAL calls. If you execute jstack you can see a lot of blocked calls to java.lang.Class.forName0(Native Method) method inside org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192).

Find attached a jstack file.
Steps To ReproduceDevelop a class that executes a DAL query and execute it concurrently several times.

We have an environment and a jmeter test that can make reproducing this easier.
TagsPerformance
Attached Files? file icon jstackBlocked [^] (143,726 bytes) 2015-05-21 17:53 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0077630)
shuehner (administrator)
2015-05-21 18:11

I think interesting part of the attached file i starting line:
"TP-Processor152" daemon prio=10 tid=0x00007eff441c2000 nid=0x15ef waiting for monitor entry [0x00007effe8ae1000]

The lines before i think are not relevant for the issue.

Starting that line you can see triggering stacktrace + also the contented lock which seems to be part of tomcat classloader being used indirectly (and apparently on every dal call)
(0077634)
mtaal (manager)
2015-05-21 18:50

There is this code in SessionImpl:
    public List list(CriteriaImpl criteria) throws HibernateException {
        errorIfClosed();
        checkTransactionSynchStatus();
        String[] implementors = factory.getImplementors( criteria.getEntityOrClassName() );

See the last line. I checked if there was a way to override/replace the factory but this will be somewhat difficult I think.

I guess it is a Hibernate bug...

I checked and the only place in the SessionImpl where the getImplementors is called is in this method.

Probably a workaround is to rewrite the custom code to not use a Criteria but a hibernate Query object. Should be quite doable.

gr. Martin
(0078624)
alostale (manager)
2015-07-02 12:20

Moving to design defect because of the difficulty and risk of this fix. Use the workaround for these cases for now.

- Issue History
Date Modified Username Field Change
2015-05-21 17:53 ioritzCia New Issue
2015-05-21 17:53 ioritzCia Assigned To => platform
2015-05-21 17:53 ioritzCia File Added: jstackBlocked
2015-05-21 17:53 ioritzCia Web browser => Google Chrome
2015-05-21 17:53 ioritzCia Modules => Core
2015-05-21 17:53 ioritzCia Triggers an Emergency Pack => No
2015-05-21 17:54 ioritzCia Tag Attached: Performance
2015-05-21 18:11 shuehner Note Added: 0077630
2015-05-21 18:11 shuehner Issue Monitored: shuehner
2015-05-21 18:50 mtaal Note Added: 0077634
2015-05-25 12:42 jonalegriaesarte Web browser Google Chrome => Google Chrome
2015-05-25 12:42 jonalegriaesarte Resolution time => 1435183200
2015-07-02 12:20 alostale Web browser Google Chrome => Google Chrome
2015-07-02 12:20 alostale Resolution time 1435183200 =>
2015-07-02 12:20 alostale Note Added: 0078624
2015-07-02 12:20 alostale Status new => acknowledged
2015-07-02 12:20 alostale Type defect => design defect
2022-02-01 08:09 alostale Assigned To platform => Triage Platform Base


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker