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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0053423
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorrandom2023-09-08 13:032023-09-13 10:11
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in VersionPR23Q4
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0053423: cannot open any BO windows

DescriptionUnder certain circumstances, if a given race condition occurs, it is possible that no BO window can be opened.

Workaround: This race condition occurs during initialization, and gets cached. So if it occurs, it will continue in this incorrect status until Tomcat is restarted.

The problem is in BaseComponent.getContextUrl[1] method, that can be invoked concurrently although it sets and mutates an static shared variable. If there are two concurrent requests accessing this method one of them could return a corrupted value, if the one that received the corrupted value was serving the application component, which is later part of generated js file and therefore cached, this value will be incorrect causing failures when composing the url to retrieve views.


[1] https://gitlab.com/openbravo/product/openbravo/-/blob/release/23Q3/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponent.java?ref_type=heads#L90 [^]
 
Steps To ReproduceIt occurs very rarely:

1. Restart Tomcat
2. Open several BO applications at the same time
3. Try to open any window:
   ERROR
     * it keeps in loading forever
     * http request to generate its view results in a 404 because the url is incorrectly built
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0154636)
hgbot (developer)
2023-09-08 13:17

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/992 [^]
(0154760)
hgbot (developer)
2023-09-13 08:21

Merge Request created: https://gitlab.com/openbravo/ci/backoffice-api/-/merge_requests/49 [^]
(0154763)
hgbot (developer)
2023-09-13 09:22

Repository: https://gitlab.com/openbravo/ci/backoffice-api [^]
Changeset: 37d0afb4f28404b9094a9fb1cd2d05166aff16f5
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 13-09-2023 08:19:23
URL: https://gitlab.com/openbravo/ci/backoffice-api/-/commit/37d0afb4f28404b9094a9fb1cd2d05166aff16f5 [^]

related to BUG-53423: API change: BaseComponent.setContextUrl is private static

---
M java/reference/java.japi.gz
---
(0154764)
hgbot (developer)
2023-09-13 09:22

Merge request merged: https://gitlab.com/openbravo/ci/backoffice-api/-/merge_requests/49 [^]
(0154765)
hgbot (developer)
2023-09-13 09:22

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/992 [^]
(0154766)
hgbot (developer)
2023-09-13 09:22

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 291e8810367f91ddee726efada674f7e3bf674e0
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 13-09-2023 08:13:56
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/291e8810367f91ddee726efada674f7e3bf674e0 [^]

fixes BUG-53423: cannot open any BO window due to incorrect ctx initialization

BaseComponent.getContextUrl method can be concurrently invoked, as it mutated a
static contextUrl variable it could be served in a corrupted (partial) state. If
this occurred while generating application component, no view could later be
opened.

This fix includes:
  * Transformations on contextUrl variable are done in a temporary variable, to
    be cached only when completelly computed.
  * It is set in a synchronized method: although this has no real effect, it
    makes it more explicit.

In addition:
  * contextUrl private variable is only exposed through its getter, its contents
    were not directly got but transformed every time. Now this transformation is
    also persisted so it is executed only once.
  * setContextUrl method is now private as it was not publicly used.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponent.java
---
(0154768)
hgbot (developer)
2023-09-13 10:11

Repository: https://gitlab.com/openbravo/ci/mobile-api [^]
Changeset: 0f4cec5fe1f6aa38edf2270c6ee1c9cdebb5813c
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 13-09-2023 10:11:27
URL: https://gitlab.com/openbravo/ci/mobile-api/-/commit/0f4cec5fe1f6aa38edf2270c6ee1c9cdebb5813c [^]

related to BUG-53423: API change: BaseComponent.setContextUrl is private static

---
M java/reference/java.japi.gz
---

- Issue History
Date Modified Username Field Change
2023-09-08 13:03 alostale New Issue
2023-09-08 13:03 alostale Assigned To => Triage Platform Base
2023-09-08 13:03 alostale Modules => Core
2023-09-08 13:03 alostale Triggers an Emergency Pack => No
2023-09-08 13:03 alostale Assigned To Triage Platform Base => alostale
2023-09-08 13:17 hgbot Note Added: 0154636
2023-09-13 08:21 hgbot Note Added: 0154760
2023-09-13 09:22 hgbot Note Added: 0154763
2023-09-13 09:22 hgbot Note Added: 0154764
2023-09-13 09:22 hgbot Note Added: 0154765
2023-09-13 09:22 hgbot Resolution open => fixed
2023-09-13 09:22 hgbot Status new => closed
2023-09-13 09:22 hgbot Fixed in Version => PR23Q4
2023-09-13 09:22 hgbot Note Added: 0154766
2023-09-13 10:11 hgbot Note Added: 0154768


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker