Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0037893 | Openbravo ERP | A. Platform | public | 2018-02-13 10:16 | 2018-02-22 18:19 |
|
Reporter | AugustoMauch | |
Assigned To | alostale | |
Priority | immediate | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR18Q2 | |
Merge Request Status | |
Review Assigned To | AugustoMauch |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | Production - Confirmed Stable |
Regression date | 2016-04-26 |
Regression introduced in release | 3.0PR17Q3 |
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/dafb9b081971 [^] |
Triggers an Emergency Pack | No |
|
Summary | 0037893: ConcurrentModificationException when working with SessionListener.activeHttpSessions |
Description | The following exception has been found in a customer log:
b45df575 2018-02-12 16:53:13,566 [ajp-bio-127.0.0.1-8009-exec-54] ERROR org.openbravo.erpCommon.security.SessionListener - Error getting active session from context
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:923)
at java.util.HashMap$KeyIterator.next(HashMap.java:957)
at org.openbravo.erpCommon.security.SessionListener.getActiveSession(SessionListener.java:178)
at org.openbravo.erpCommon.obps.ActivationKey.shouldDeactivateSession(ActivationKey.java:1175)
at org.openbravo.erpCommon.obps.ActivationKey.deactivateTimeOutSessions(ActivationKey.java:1131)
at org.openbravo.erpCommon.obps.ActivationKey.checkOPSLimitations(ActivationKey.java:976)
at org.openbravo.erpCommon.obps.ActivationKey.checkOPSLimitations(ActivationKey.java:923)
The access to the SessionListener.activeHttpSessions Set is not being properly managed, as it is possible to add/remove elements from it while it is being iterated. |
Steps To Reproduce | - |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0037899 | | closed | alostale | Session in POS can prevent an ERP session (which counts for concurrent user limit) from being closed | depends on | backport | 0037894 | 3.0PR18Q1 | closed | alostale | ConcurrentModificationException when working with SessionListener.activeHttpSessions | depends on | backport | 0037895 | 3.0PR17Q4.1 | closed | alostale | ConcurrentModificationException when working with SessionListener.activeHttpSessions | caused by | feature request | 0032821 | | closed | platform | Mobile Core. Reinforce CU Licensing | has duplicate | defect | 0037892 | | closed | platform | Expired sessions are not cleared out after reaching the limit of concurrent users | blocks | design defect | 0034664 | | acknowledged | Triage Platform Base | multi thread unsafeties |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2018-02-13 10:16 | AugustoMauch | New Issue | |
2018-02-13 10:16 | AugustoMauch | Assigned To | => platform |
2018-02-13 10:16 | AugustoMauch | Modules | => Core |
2018-02-13 10:16 | AugustoMauch | Triggers an Emergency Pack | => No |
2018-02-13 10:20 | alostale | Regression level | => Production - Confirmed Stable |
2018-02-13 10:20 | alostale | Regression date | => 2016-04-26 |
2018-02-13 10:20 | alostale | Regression introduced in release | => 3.0PR17Q3 |
2018-02-13 10:20 | alostale | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/dafb9b081971 [^] |
2018-02-13 10:20 | alostale | Priority | normal => immediate |
2018-02-13 10:20 | alostale | Relationship added | depends on 0032821 |
2018-02-13 10:21 | alostale | Relationship replaced | caused by 0032821 |
2018-02-13 10:22 | alostale | Relationship added | blocks 0034664 |
2018-02-13 10:22 | alostale | Assigned To | platform => alostale |
2018-02-13 10:23 | alostale | Status | new => scheduled |
2018-02-13 10:23 | alostale | Status | scheduled => feedback |
2018-02-13 10:25 | alostale | Status | feedback => scheduled |
2018-02-13 11:11 | plujan | Relationship added | has duplicate 0037892 |
2018-02-13 11:26 | AugustoMauch | Relationship added | related to 0037899 |
2018-02-13 12:57 | hgbot | Checkin | |
2018-02-13 12:57 | hgbot | Note Added: 0102350 | |
2018-02-13 12:57 | hgbot | Status | scheduled => resolved |
2018-02-13 12:57 | hgbot | Resolution | open => fixed |
2018-02-13 12:57 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/d126554d216bef98a3bea0d94dee2c8ef69a5198 [^] |
2018-02-13 12:57 | hgbot | Checkin | |
2018-02-13 12:57 | hgbot | Note Added: 0102352 | |
2018-02-13 13:06 | AugustoMauch | Review Assigned To | => AugustoMauch |
2018-02-13 13:06 | AugustoMauch | Note Added: 0102358 | |
2018-02-13 13:06 | AugustoMauch | Status | resolved => closed |
2018-02-13 13:06 | AugustoMauch | Fixed in Version | => 3.0PR18Q2 |
2018-02-22 18:19 | hudsonbot | Checkin | |
2018-02-22 18:19 | hudsonbot | Note Added: 0102749 | |
2018-02-22 18:19 | hudsonbot | Checkin | |
2018-02-22 18:19 | hudsonbot | Note Added: 0102751 | |
Notes |
|
(0102350)
|
hgbot
|
2018-02-13 12:57
|
|
Repository: erp/devel/pi
Changeset: d126554d216bef98a3bea0d94dee2c8ef69a5198
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Feb 13 12:06:02 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d126554d216bef98a3bea0d94dee2c8ef69a5198 [^]
fixed bug 37893, fixed bug 37899: incorrect CU handling in concurrency and POS
Concurrent Users management had two different problems:
* If a backoffice session was reused in POS closing backoffice browser, a CU
session was counted and it was not deactivated while POS session was active.
In this situation, the session should be deactivated if CU limit has been
reached.
* Code for creating and checking active http sessions in context was not thread
safe, so it was possible to get an error when checking if session was active while
other sessions were created/destroyed in paralell. This has been fixed by
synchronizing on active session set. Having solved previous issue this should
not create excessive contentention as it will be executed only if: CU limit has
been reached and there are sessions created by mobile modules exclude POS.
---
M src/org/openbravo/erpCommon/obps/ActivationKey.java
M src/org/openbravo/erpCommon/security/SessionListener.java
---
|
|
|
(0102352)
|
hgbot
|
2018-02-13 12:57
|
|
Repository: erp/devel/pi
Changeset: 4f7e83a9ad57b7d485958c844a8452c48fdd6264
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Feb 13 12:08:43 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4f7e83a9ad57b7d485958c844a8452c48fdd6264 [^]
related to bug 37893: added test case
Which ensures sessions can be created and checked concurrently.
---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
A src-test/src/org/openbravo/test/system/Sessions.java
---
|
|
|
|
Code reviewed and verified in pi@4f7e83a9ad57 |
|
|
|
|
|
|
|