Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036271Openbravo ERPA. Platformpublic2017-06-19 10:512017-06-20 09:10
alostale 
alostale 
urgentminorhave not tried
closedfixed 
5
 
3.0PR17Q3 
caristu
Core
No
0036271: login page logs error if loaded while logging out
If while in process of log out, login page is loaded, an error message can be logged.

This error occurs when trying to clean up a session that's already invalidated, even it's logged there is no real issue.

This is causing int-initial-pgsql in CI to fail quite often, see [1]: failed builds 2037-2040.

---
[1] https://ci.openbravo.com/job/int-initial-pgsql/ [^]
1. Log in application
2. Log out
3. While logging out stop thread in BaseKernelServlet.invalidateSession before session.invalidate() line (line 0000223:0000093)
4. Open Login window in the same browser
5. Stop login window thread in Login class before vars.clearSession (line ~118)
6. Resume logout thread
7. Resume login page thread
  -> In this thread you'll see:
b3e0edee 2017-06-18 01:58:06,429 [ajp-bio-127.0.0.1-8009-exec-2] ERROR org.openbravo.base.VariablesBase - clearSession error
java.lang.IllegalStateException: getAttributeNames: Session already invalidated
    at org.apache.catalina.session.StandardSession.getAttributeNames(StandardSession.java:1186)
    at org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:137)
    at org.openbravo.base.VariablesBase.clearSession(VariablesBase.java:1456)
    at org.openbravo.erpCommon.security.Login.doPost(Login.java:118)
In this case, remove error from logs (simply ignore it).
No tags attached.
blocks design defect 0036162 acknowledged Triage Platform Base clean up openbravo.log 
Issue History
2017-06-19 10:51alostaleNew Issue
2017-06-19 10:51alostaleAssigned To => platform
2017-06-19 10:51alostaleModules => Core
2017-06-19 10:51alostaleTriggers an Emergency Pack => No
2017-06-19 10:51alostaleAssigned Toplatform => alostale
2017-06-19 10:51alostaleReview Assigned To => caristu
2017-06-19 10:51alostalePrioritynormal => urgent
2017-06-19 10:56hgbotCheckin
2017-06-19 10:56hgbotNote Added: 0097473
2017-06-19 10:56hgbotStatusnew => resolved
2017-06-19 10:56hgbotResolutionopen => fixed
2017-06-19 10:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/75e216b9efe2596f50c1dd1cf9f5ac6a16fa04c8 [^]
2017-06-19 10:58alostaleRelationship addedblocks 0036162
2017-06-19 16:23hudsonbotCheckin
2017-06-19 16:23hudsonbotNote Added: 0097481
2017-06-20 09:10caristuNote Added: 0097499
2017-06-20 09:10caristuStatusresolved => closed
2017-06-20 09:10caristuFixed in Version => 3.0PR17Q3

Notes
(0097473)
hgbot   
2017-06-19 10:56   
Repository: erp/devel/pi
Changeset: 75e216b9efe2596f50c1dd1cf9f5ac6a16fa04c8
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Jun 19 10:54:05 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/75e216b9efe2596f50c1dd1cf9f5ac6a16fa04c8 [^]

fixed bug 36271: login page logs error if loaded while logging out

  Don't try to get/remove attributes from HttpSession if it's already invalidated.

  Note HttpSession API doesn't provide a method to check if its status, so only
  way it to catch IllegalStateException.

---
M src-core/src/org/openbravo/base/VariablesBase.java
---
(0097481)
hudsonbot   
2017-06-19 16:23   
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/2bb472b1616b [^]
Maturity status: Test
(0097499)
caristu   
2017-06-20 09:10   
Code reviewed + tested OK.