tracker issue : CF-3041660

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

Bug 83359:(Watson Migration Closure)Tags used inside a cfthread allocate resources that are not freed until the thread ends

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Elliott Sprehn / Elliott Sprehn (Elliott Sprehn)

Created: 06/16/2010

Components: Language, Tags

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Major / Most users will encounter

Locale/System: English / Platforms All

Vote Count: 4

Listed in the version 2016.0.0.297996 Issues Fixed doc
Problem:

Tags used inside a cfthread allocate resources that are not freed until the thread ends.ex.<cfthread name="test">  <cfloop from="1" to="10000" index="i">      <cflog text="This is very bad.">      <cflock name="test" timeout="10">      </cflock>  </cfloop>  <!--- Sleep a very long time (10 minutes) --->  <cfset sleep(600000)></cfthread>If you take a heap dump with jmap and then look at it with jhat or something easier like VisualVM you’ll see that there are 10000 instances of coldfusion.tagext.lang.LockTag and 10000 instances of coldfusion.tagext.lang.LogTag.These instances will NEVER go away until the thread ends.I’ve reproduced this on every install of CF8, but not yet tried CF9. cfthread on CF8 is super dangerous because of this bug, it’s very easy to take down a whole server. Can someone test on CF9? I’ll try soon if I have some time.This is really critical. It’s very easy to get an OutOfMemoryError and cripple a server by having a long running thread, and these are tags that should not be holding resources. Once a cflog or cflock executes it shouldn’t hang around. I have a feeling there’s lots more tags that cause similar memory usage problems.Until this is fixed any kind of long running background thread is impossible. We’ve downed our server several times with this because we had a task queue cfthread that just ran constantly in the background handling background requests, but it’d slowly eat away all the memory of the server even if it wasn’t doing anything except using cflock and then sleeping.
Method:


Result:

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

Watson Bug ID:	3041660

External Customer Info:
External Company:  
External Customer Name: Elliott Sprehn
External Customer Email: 202D59C844579997992016B7
External Test Config: 06/16/2010

Attachments:

Comments:

This bug has been voted..
Vote by External U.
22067 | November 11, 2011 12:55:34 AM GMT
This bug has been voted..
Vote by External U.
22068 | November 11, 2011 12:55:35 AM GMT
This bug has been voted..
Vote by External U.
22069 | November 11, 2011 12:55:36 AM GMT
This bug has been voted..
Vote by External U.
22070 | November 11, 2011 12:55:38 AM GMT
Given how serious this is (and I have heard of someone else being affected by it today), isn't it perhaps time that you guys *found time* to fix it? -- Adam
Comment by External U.
22066 | January 17, 2014 03:21:29 PM GMT