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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028519
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformcriticalhave not tried2015-01-05 11:112015-02-04 20:33
ReportershuehnerView Statuspublic 
Assigned ToAugustoMauch 
PriorityhighResolutionfixedFixed in Version3.0PR15Q2
StatusclosedFix in branchFixed in SCM revision63a5eca5e0ce
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0PR14Q3.2SCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028519: Java-thread apparently deadlocking in OrganizationStructureProvider.initialize

DescriptionThe following behavior has been observered in a customer instance.

cpu-usage flat 600% for 6 cores fully used.
Checking jstack we see 6 threads which status runnable with following end of signature
Addittionaly each of that seems to hold one open transaction while it is running (as seeing 6 db connections in status idle in transaction)

   java.lang.Thread.State: RUNNABLE
        at java.util.HashMap.put(HashMap.java:391)
        at org.openbravo.dal.security.OrganizationStructureProvider.initialize(OrganizationStructureProvider.java:114)

That looks very similar to a problem we had 6-12month ago with i think ApplicationDictionaryCache.

jstack will be attached.
Full HeapDump available on request from shu
Steps To Reproduceunknown

TagsNo tags attached.
Attached Filestxt file icon leob-jstack-20150105-11h56.txt [^] (63,200 bytes) 2015-01-05 11:13 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00244213.0MP28 closedalostale ApplicationDictionaryCachedStructures is not thread safe 

-  Notes
(0073323)
hgbot (developer)
2015-01-07 10:22

Repository: erp/devel/pi
Changeset: 63a5eca5e0cefbdf99f7895ef7900aeeda0b8fc9
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed Jan 07 10:18:24 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/63a5eca5e0cefbdf99f7895ef7900aeeda0b8fc9 [^]

Fixes bug 28519:OrganizationStructureProvider.initialize should be synchronized

The method OrganizationStructureProvider.initialize should be synchronized, because otherwise it could be executed concurrently. The first thing the method does it to check if it the OrganizationStructureProvider has been already initialized, but this is not enough to prevent the concurrent initializations.

One of the consequences of the concurrent initializations is that the three maps used in that method (naturalTreesByOrgID, parentByOrganizationID and childByOrganizationID) can be left in an inconsistent state, resulting in the a 100% CPU usage when trying to access them.

---
M src/org/openbravo/dal/security/OrganizationStructureProvider.java
---
(0073341)
alostale (manager)
2015-01-08 08:04

Code reviewed. This should fix the reported issue by checking the stack trace, though it was not possible to reproduce before the patch.
(0074116)
hudsonbot (developer)
2015-02-04 20:33

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f36c91d0ad63 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-01-05 11:11 shuehner New Issue
2015-01-05 11:11 shuehner Assigned To => AugustoMauch
2015-01-05 11:11 shuehner Modules => Core
2015-01-05 11:11 shuehner Resolution time => 1421017200
2015-01-05 11:11 shuehner Triggers an Emergency Pack => No
2015-01-05 11:12 shuehner Description Updated View Revisions
2015-01-05 11:13 shuehner File Added: leob-jstack-20150105-11h56.txt
2015-01-05 11:16 shuehner Relationship added related to 0024421
2015-01-07 10:19 AugustoMauch Issue Monitored: alostale
2015-01-07 10:19 AugustoMauch Review Assigned To => alostale
2015-01-07 10:22 hgbot Checkin
2015-01-07 10:22 hgbot Note Added: 0073323
2015-01-07 10:22 hgbot Status new => resolved
2015-01-07 10:22 hgbot Resolution open => fixed
2015-01-07 10:22 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/63a5eca5e0cefbdf99f7895ef7900aeeda0b8fc9 [^]
2015-01-08 08:04 alostale Note Added: 0073341
2015-01-08 08:04 alostale Status resolved => closed
2015-01-08 08:04 alostale Fixed in Version => 3.0PR15Q2
2015-02-04 20:33 hudsonbot Checkin
2015-02-04 20:33 hudsonbot Note Added: 0074116


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker