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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0014012
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2010-07-20 18:402010-08-16 17:48
ReportershuehnerView Statuspublic 
Assigned Toiperdomo 
PriorityurgentResolutionno change requiredFixed in Version
StatusclosedFix in branchpiFixed in SCM revision94fcf9a433af
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

0014012: Race-condition when doing Login having an AuthenticationManager (and using DeepLinking)

DescriptionWhen using an authentication manager the SessionLogin.save call (which inserts the row into ad_session) is done late in the sevice method of the HttpSecureAppServlet class without doing an immediate commit.
So only the implicit commit at end of the HTTP-request finally makes the row visible to other connections.

However in the service methods another xsql method checks this db-row already.
When doing a login (i.e. with DeepLinking) several requests are in flight at the same time -> Race-Condition if another requests checks the row via the xsql-method before the dal-using request finishes (and did its commit)

-> xsql-method doing force-logout
Steps To Reproducesee also support ticket 8143
Proposed Solutiondo a commit after inserting the new row
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0029421)
shuehner (administrator)
2010-07-20 18:41

Note: The code probably intended to do a commit using a flush() call, however the flush() call does not do a commit but just the sql insert/update statement without committing the transaction.
(0029428)
hgbot (developer)
2010-07-21 11:28

Repository: erp/devel/pi
Changeset: 94fcf9a433af8b7dedd82a034a5c75c831603407
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed Jul 21 11:28:33 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/94fcf9a433af8b7dedd82a034a5c75c831603407 [^]

Fixed 14012: Do commit immediately after insert into ad_session..
.. to prevent a race condition with other requests using i.e. xsql-queries
which otherwise don't see the inserted record early enough.
This happens when using DeepLinking together with any custom AuthManager.

---
M src/org/openbravo/erpCommon/security/SessionLogin.java
---
(0029544)
hudsonbot (developer)
2010-07-24 22:54

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/94fcf9a433af [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/eb739d47ff2b [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17900.obx [^]

- Issue History
Date Modified Username Field Change
2010-07-20 18:40 shuehner New Issue
2010-07-20 18:40 shuehner Assigned To => shuehner
2010-07-20 18:41 shuehner Note Added: 0029421
2010-07-21 11:28 hgbot Checkin
2010-07-21 11:28 hgbot Note Added: 0029428
2010-07-21 11:28 hgbot Status new => resolved
2010-07-21 11:28 hgbot Resolution open => fixed
2010-07-21 11:28 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/94fcf9a433af8b7dedd82a034a5c75c831603407 [^]
2010-07-24 22:54 hudsonbot Checkin
2010-07-24 22:54 hudsonbot Note Added: 0029544
2010-08-10 16:04 alostale Status resolved => closed
2010-08-10 16:04 alostale Fixed in Version => 2.50MP21
2010-08-11 00:00 anonymous sf_bug_id 0 => 3042775
2010-08-16 17:47 iperdomo Assigned To shuehner => iperdomo
2010-08-16 17:47 iperdomo Status closed => new
2010-08-16 17:47 iperdomo Resolution fixed => open
2010-08-16 17:47 iperdomo Fixed in Version 2.50MP21 =>
2010-08-16 17:47 iperdomo Status new => scheduled
2010-08-16 17:47 iperdomo fix_in_branch => pi
2010-08-16 17:48 iperdomo Status scheduled => closed
2010-08-16 17:48 iperdomo Resolution open => no change required


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker