tracker issue : CF-4099820

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

WeakHashMap in in cfusion.jar is not thread safe and can cause infinite loops

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Bob Albright / Bob Albright (Bob Albright)

Created: 12/14/2015

Components: Core Runtime

Versions: 11.0

Failure Type: Crash

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / Some users will encounter

Locale/System: ALL / Win 2012 Server x64

Vote Count: 1

Listed in the version 2016.0.03.300466 Issues Fixed doc
Problem Description:

The WeakHashMap (variable name classCache) in is not safe to use across multiple threads at once (similar to most Map objects in java.util.*).  There are concurrency situations that can cause data internal to the HashMap to get corrupted and lead to 100% CPU usage for get operations.  The specifics for this to happen (multiple resize operations at once) are complicated.  This blog post ( does a good job describing what causes this problem.

Also note that this bug is similar to issue number 3295469 (

Attachment details:
* cpu_pegged_stacktrace.txt - this is a jstack thread dump from one of our servers after it got into a 100% CPU usage scenario
* - this is the .class file from cfusion.jar that contains a bug
* - I believe that this is the change you need to make to this code to fix the problem
* cf8 folder
** I have attached some additional context for how this class was implemented in ColdFusion 8.  In ColdFusion 8, this class was implemented significantly differently and it appears that a lot of thought was put into handling concurrency situations (CF8 used "coldfusion.util.SoftCache) instead of the WeakHashMap.

Steps to Reproduce:
No known ways to easily reproduce the problem.  We have hit this approximately once a week for the last month or so across ~10 ColdFusion instances.  I was not able to setup a simple example that gets into a 100% CPU utilization situation.

Actual Result:
100% CPU utilization and requests don't complete.  The server must be restarted after it gets into a 100% CPU state.

Expected Result:
Requests process normally.

Any Workarounds:

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

Watson Bug ID:	4099820

External Customer Info:
External Company:  
External Customer Name: Bob Albright
External Customer Email:  
External Test Config: My Hardware and Environment details:

Not applicable


  1. December 14, 2015 00:00:00:


Debugging this issue required a variety of low-level tools and has yet again delayed our attempts to upgrade to ColdFusion 11.
Vote by External U.
5104 | December 14, 2015 11:06:03 AM GMT
This issue is fixed now. The fix for this issue will be available as part of an upcoming update of ColdFusion.
Comment by Nimit S.
5103 | August 09, 2016 12:34:20 AM GMT