tracker issue : CF-4198394

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

Concurrency issues when writing to mappings returned from getApplicationMetadata() under load

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Bill Reese / Bill Reese ()

Created: 03/08/2017

Components: Application Framework

Versions: 2016,11.0

Failure Type: Others

Found In Build/Fixed In Build: ColdFusion 11 update 11, jre 1.8.121 / 2018,0,0,307390

Priority/Frequency: Normal /

Locale/System: / Platforms All

Vote Count: 6

Problem Description: when writing mappings to the object returned by getApplicationMetadata() 
I get the error under load of: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437) at java.util.HashMap$KeyIterator.next(HashMap.java:1461) at java.util.AbstractCollection.toArray(AbstractCollection.java:196) at coldfusion.util.CaseInsensitiveMap$FastHashKeyEnumerator.<init>(CaseInsensitiveMap.java:457) at coldfusion.util.CaseInsensitiveMap$KeySet.iterator(CaseInsensitiveMap.java:321) at coldfusion.runtime.TemplateProxyFactory.getFullName(TemplateProxyFactory.java:1169) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:202) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:159) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:149) at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:57)
Steps to Reproduce:
code in question is: 
var appSettings = getApplicationMetadata();
appSettings.mappings[ 'mapping' ] = 'path';
Actual Result: error

Expected Result: no error

Any Workarounds:

Attachments:

Comments:

The code in this ticket is part of the ColdBox framework, which runs on every request to set up dynamic mappings for installed modules. I'm very interested in getting this looked at. Seems like some sort of concurrency issue under the covers in ColdFusion.
Comment by Bradley Wood
1118 | March 08, 2017 07:36:01 PM GMT
Also having this issue using coldbox with CF11
1122 | March 09, 2017 03:07:06 PM GMT
I have been running into the same issues. Created a minimum working sample to prove that this function is not thread safe: https://github.com/evagoras/acf_mappings_thread_safety_issue
1123 | March 11, 2017 03:16:59 AM GMT
I think this ticket might be related to https://tracker.adobe.com/#/view/CF-4198397
Comment by Bradley Wood
1119 | March 11, 2017 03:34:36 AM GMT
+1 ...........
Vote by Aaron Neff
1124 | July 09, 2017 11:57:25 PM GMT
how can we get access to a hot fix for testing?
Comment by Bill Reese
1120 | July 26, 2017 11:26:37 PM GMT
Would also be happy to test out a hotfix - this is causing is lots of issues.
Comment by Chris Hopkins
1121 | July 27, 2017 11:29:05 AM GMT
Was this fix only released in CF 2018 and not CF 2016 or CF 11?
Comment by Bradley Wood
29937 | November 15, 2018 11:25:52 PM GMT