Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0010207 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | have not tried | 2009-08-06 16:02 | 2009-08-19 00:00 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | 141033086c67 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | pi | SCM revision | ||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0010207: Static calls members with shared use in translation code | |||||||
Description | org.openbravo.uiTranslation.TranslationUtils has a couple of static class members which are used to store the currently needed translation string for a currently running window. As these are static (shared) this will lead to random wrong data and possibly deadlocks depending on the access pattern | |||||||
Proposed Solution | Fix translation code to not use shared members for writable data. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0018864) shuehner (administrator) 2009-08-06 16:03 |
This issue was found while investigating random 100% cpu usage in the ob@ob 2.50 instance. Checking the stacktrace of a 'stuck' process it end in a HashMap.put of one of these static members inside the translation code. "ajp-8009-4" - Thread t@38 java.lang.Thread.State: RUNNABLE at java.util.HashMap.put(HashMap.java:374) at org.openbravo.uiTranslation.TranslationUtils.populateLabelMap(TranslationUtils.java:202) at org.openbravo.uiTranslation.TranslationUtils.processFormLabels(TranslationUtils.java:35) at org.openbravo.uiTranslation.TranslationHandler.processTranslations(TranslationHandler.java:206) at org.openbravo.uiTranslation.TranslationHandler.generateTranslations(TranslationHandler.java:109) at org.openbravo.xmlEngine.XmlDocument.print(XmlDocument.java:272) at org.openbravo.xmlEngine.XmlDocument.print(XmlDocument.java:222) at org.openbravo.xmlEngine.DataValue.printDetail(DataValue.java:402) at org.openbravo.xmlEngine.DataValue.executeArray(DataValue.java:220) at org.openbravo.xmlEngine.DataValue.printGenerated(DataValue.java:150) at org.openbravo.xmlEngine.XmlDocument.print(XmlDocument.java:290) at org.openbravo.xmlEngine.XmlDocument.print(XmlDocument.java:222) at org.openbravo.erpWindows.ReportandProcess.ReportProcess.printPageEdit(ReportProcess.java:805) at org.openbravo.erpWindows.ReportandProcess.ReportProcess.doPost(ReportProcess.java:110) at org.openbravo.base.HttpBaseServlet.doGet(HttpBaseServlet.java:283) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225) at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:331) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:79) at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46) at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:85) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419) at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:378) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509) at java.lang.Thread.run(Thread.java:619) |
(0018870) shuehner (administrator) 2009-08-06 19:55 |
Update to immediate as requested by ob@ob team and acked by pjuvara |
(0018872) hgbot (developer) 2009-08-07 08:03 |
Repository: erp/devel/pi Changeset: 141033086c67e4c7896ea409cd23f5f576a64f0d Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Fri Aug 07 08:03:17 2009 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/141033086c67e4c7896ea409cd23f5f576a64f0d [^] fixed bug 0010207: Static calls members with shared use in translation code This fix includes part1: - fileName, language, conn: pass as parameters, remove statics - interfaceType unused, remove - inline code from populateLabelMap into retrieveLabelData and let retireveLabelData return the result HashMap - removes textmap, textData statics part2: - in populateProcessLabels use local array to collecting result and return it do not touch global array anymore - in processProcessLabels use (new) returnValue of populateProcessLabels and return it in error case return zero-sized empty as then for-loop in caller just does nothing part3: - in processFormLabels use local windowLabels array instead of global one simplify copying vector -> array return empty array in error case (so for-loop in caller does nothing) part2+3 assume that the array values from processProcessLabels and processFormLabels should not mix.. part4: - in processFormLabels allocate local windowLabelsCol list - pass list into populateFieldLabels & populateFieldGroupLabels as parameter - in populateFieldLabels, populateFieldGroupLabels modify parameter passed in list, instead of global one --- M src-core/src/org/openbravo/uiTranslation/TranslationUtils.java --- |
![]() |
|||
Date Modified | Username | Field | Change |
2009-08-06 16:02 | shuehner | New Issue | |
2009-08-06 16:02 | shuehner | Assigned To | => rafaroda |
2009-08-06 16:02 | shuehner | OBNetwork customer | => No |
2009-08-06 16:03 | shuehner | Note Added: 0018864 | |
2009-08-06 19:55 | shuehner | Note Added: 0018870 | |
2009-08-06 19:55 | shuehner | Priority | urgent => immediate |
2009-08-06 19:55 | shuehner | Assigned To | rafaroda => alostale |
2009-08-07 08:03 | hgbot | Checkin | |
2009-08-07 08:03 | hgbot | Note Added: 0018872 | |
2009-08-07 08:03 | hgbot | Status | new => resolved |
2009-08-07 08:03 | hgbot | Resolution | open => fixed |
2009-08-07 08:03 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/141033086c67e4c7896ea409cd23f5f576a64f0d [^] |
2009-08-18 10:16 | plujan | Status | resolved => closed |
2009-08-19 00:00 | anonymous | sf_bug_id | 0 => 2839900 |
Copyright © 2000 - 2009 MantisBT Group |