Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039060Openbravo ERPA. Platformpublic2018-07-27 09:092018-08-08 13:06
alostale 
alostale 
normalmajorrandom
closedfixed 
5
 
3.0PR18Q4 
caristu
Core
No
0039060: reports randomly not downloaded using different server names
If the same Openbravo instance is accessed concurrently with different server name (ie via ip and server name), downloading reports can randomly fail.
In a local instance:

1. Apply attached 39060-force-error.diff which allows to emulate concurrency race condition by delaying half of the requests to GeneralAccountingReports
2. In browser A, log in using http://localhost:8080/openbravo [^]
3. In browser B (note it must be another browser/context in order to isolate session cookies), log in using http://127.0.0.1:8080/openbravo [^]
4. In both browsers open Balance sheet and P&L structure report
5. Fill in all required parameters
6. In browser A, click on PDF button (check it takes more than 5s to complete the request, if that's not the case click again)
7. While browser A is processing the request, in browser B click on PDF button
  -> ERROR: the report is not downloaded in browser A, although it is in B
            there should be a GET request to download report, depending on names used for server and on browser, this request in the failing browser will have a 302 status (which redirects to Login page though it is not visualized) or it will be completelly blocked by browser
No tags attached.
related to defect 0034526 acknowledged Triage Platform Base HttpBaseServlet is not thread safe 
related to defect 0038590 closed platform Failure to download pdf 
blocks design defect 0034664 acknowledged Triage Platform Base multi thread unsafeties 
diff 39060-force-error.diff (1,708) 2018-07-27 09:10
https://issues.openbravo.com/file_download.php?file_id=12014&type=bug
Issue History
2018-07-27 09:09alostaleNew Issue
2018-07-27 09:09alostaleAssigned To => platform
2018-07-27 09:09alostaleModules => Core
2018-07-27 09:09alostaleTriggers an Emergency Pack => No
2018-07-27 09:10alostaleFile Added: 39060-force-error.diff
2018-07-27 09:16alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17467#r17467
2018-07-27 09:17alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17468#r17468
2018-07-27 09:17alostaleReproducibilityhave not tried => random
2018-07-27 09:18alostaleRelationship addedblocks 0034664
2018-07-27 09:19alostaleRelationship addedrelated to 0034526
2018-07-27 09:20alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17469#r17469
2018-07-27 09:24alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17470#r17470
2018-07-27 10:25JONHMResolution time => 1534456800
2018-07-27 11:00alostaleReview Assigned To => caristu
2018-07-27 11:00alostaleAssigned Toplatform => alostale
2018-07-27 11:01alostaleRelationship addedrelated to 0038590
2018-07-27 11:05hgbotCheckin
2018-07-27 11:05hgbotNote Added: 0105978
2018-07-27 11:05hgbotStatusnew => resolved
2018-07-27 11:05hgbotResolutionopen => fixed
2018-07-27 11:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f8a0698bec678ae8b056ae1046936e5309c4b2f1 [^]
2018-07-27 12:40martinsdanIssue Monitored: martinsdan
2018-08-03 09:15caristuNote Added: 0106134
2018-08-03 09:15caristuStatusresolved => closed
2018-08-03 09:15caristuFixed in Version => 3.0PR18Q4
2018-08-08 13:06hudsonbotCheckin
2018-08-08 13:06hudsonbotNote Added: 0106233

Notes
(0105978)
hgbot   
2018-07-27 11:05   
Repository: erp/devel/pi
Changeset: f8a0698bec678ae8b056ae1046936e5309c4b2f1
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jul 27 11:04:10 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f8a0698bec678ae8b056ae1046936e5309c4b2f1 [^]

fixed bug 39060: reports randomly not downloaded using different server names

  When a report is generated in server a response with the information to download
  it is sent back to client. This information included full url based on strDireccion
  value, this variable is not thread safe and in case of using differnt names it
  can take an unexpected value.

  Now instead of an absolute path, we send a relative path startring from context.

---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---
(0106134)
caristu   
2018-08-03 09:15   
Code reviewed + tested OK.
(0106233)
hudsonbot   
2018-08-08 13:06   
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/bfd7a414183a [^]
Maturity status: Test