tracker issue : CF-3349683

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] Bug for: Update 3 mixes simultaneous requests for identical file paths in multiple sites

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 10/19/2012

Components: Web Container (Tomcat)

Versions: 10.0

Failure Type: Data Corruption

Found In Build/Fixed In Build: Final / 283199

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Win All

Vote Count: 0

Update 3 mixes simultaneous requests for identical file paths in multiple sites

Repro (code below):

1) save a copy of Application.cfc & index.cfm into c:\site1, c:\site2, & c:\site3
2) in c:\site2\Application.cfc, change THIS.name to "Site2"
3) in c:\site3\Application.cfc, change THIS.name to "Site3"
4) create an IIS 7+ site for each respectively as localhost:8011, localhost:8022, and localhost:8033
5) launch browser and open localhost:8011 into tab 1 and wait for dump to appear
6) open localhost:8022 in tab 2 and wait for dump to appear
7) open localhost:8033 in tab 3 and wait for dump to appear
8) press F5 in tab 1, then quickly press F5 in tab 2, then quickly press F5 in tab 3
8b) IMPORTANT!: tabs _must_ be loading simultaneously in order to see the problem result
9) if each tab was loaded simultaneously, then the dump result will be as follows:
9a) Tab 3's dump will contain one more row than tab 2's dump, which will contain one more row than tab 1's dump.
9b) In each tab, the CF_TEMPLATE_PATH, HTTP_HOST, PATH_TRANSLATED, and SERVER_PORT will not be the same in all rows in the dump

note: "?reinit" can be used to reset each app

Application.cfc: (for site 2, change THIS.name to "Site2") (for site 3, change THIS.name to "Site3")
----------------
component {
  THIS.name = "Site1";//"Site2" for site 2, and "Site3" for site 3
  public void function onApplicationStart() {
    APPLICATION.cgiScope = queryNew(structKeyList(CGI) & ",timestamp");
  }
  public boolean function onRequestStart() {
    if(structKeyExists(URL, "reinit")) {
      applicationStop();
      location(url="index.cfm");
    }
    sleep(4000);//allow time for other simultaneous requests to begin
    var theVars = duplicate(CGI);
    theVars.timestamp = now();
    lock name="lockdown" type="exclusive" timeout="10" {
      if(structKeyExists(APPLICATION, "cgiScope")) {
        queryAddRow(APPLICATION.cgiScope, [theVars]);
      }
    }
    return true;
  }
}

index.cfm
---------
<cfscript>
  writeDump(APPLICATION);
</cfscript>

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3349683

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:

Attachments:

Comments: