tracker issue : CF-4198407

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

Compiler sometimes fails to compile the java classes for function expressions (or closures)

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): e-domizil License Team / e-domizil License Team ()

Created: 03/15/2017

Components: Core Runtime, Parser/Compiler

Versions: 2016

Failure Type: Crash

Found In Build/Fixed In Build: CF2016 Updater 3 /

Priority/Frequency: Normal / All users will encounter

Locale/System: / Win 2012 Server x64

Vote Count: 0

Problem Description: When large numbers of classes are compiled at once, the compiler sometimes fails to compile the java classes for function expressions (or closures). The resulting error message is similar to the following.

ERROR TYPE:     coldfusion.runtime.EventHandlerException 
ERROR MESSAGE:  Event handler exception. 
ERROR DETAIL:   An exception occurred while invoking an event handler method from Application.cfc. The method name is: onRequest. 
ROOT CAUSE MESSAGE:  cfparserABC2ecfc548328956$func_CF_ANONYMOUSCLOSURE_260 

When checking on the server we can see that the .class file for this function really is missing. Clearing the trusted cache for the server generally clears the problem and results in the .class file being compiled. However the problem is critical in the live environment because it persists until the trusted cache is cleared, or the server restarted. The problem is not specific to a particular .cfc or function

Server Conditions prevalent when the Problem occurs.
CPU is relatively high due to large number of files being compiled at once (application initialization). JIT is high (Just in Time Compilation). Classes Loaded Statistic is high.

Heap & Metaspace Memory are still in acceptable ranges, although a small spike will be shown as the app is initialized.

Steps to Reproduce: UNKNOWN

Actual Result: Application crashes and does not recover as class file is missing and not getting compiled.

Expected Result: No crash

Any Workarounds: None



Hi Alexander, We would need some repro case to debug your issue. It would be great if you could share your code. You can either attach the case in this bug or email it to me at Thanks, Suchika
Comment by Suchika S.
1066 | April 06, 2017 01:45:32 PM GMT
Hi Alexander, We haven't heard from you. Was your issue resolved? If not, please send us the reproducible case so that we can debug your issue. Thanks, Suchika
Comment by Suchika S.
1067 | August 01, 2017 06:36:27 AM GMT
We have not heard from you. The isdue still exists as you have not fixed the bug. We have no idea how to reproduce this intermittend bug.
Comment by Alexander H.
1068 | August 01, 2017 07:28:37 AM GMT
Hi Alexander , How are you compiling your cfms or cfcs ? Are you using "cfcompile" or have a script to execute all your cfms at once ? Thanks, Suchika
Comment by Suchika S.
1069 | September 11, 2017 07:11:12 AM GMT
We do not compile our files manually. Everything is done by cf automatically.
Comment by Alexander H.
1070 | September 11, 2017 07:37:44 AM GMT
This issue is very difficult to reproduce but it generally occurs when a large number of applications are being initialized at once on the server. My conclusion is that the server throws an error during the phase when the CFC is being parsed and the java class files are being created. (Possibly an out of memory error due to the server being temporarily under stress.) The error seemingly occurs after the "parent" cfc class file was created but not all of the smaller class files for the "anonymous_closures". Thus the java compilation ended abnormally. The problem is that the next request which runs does not recognize the compilation as being abnormally completed. It searches for the "anonymous_class" file in memory, does not find it, and throws an error. The error continues until we clear trusted cache and kill the application. The best way for you to simulate this error would be to intentionally throw a server error midway through the java compilation process of a cfc with numerous function expressions. i.e. simulate an out of memory error at the point where the cfc is being compiled.
Comment by Michael I.
1071 | September 21, 2017 09:33:52 AM GMT
@Alexander Hass/ @Michael Imig , while we are working on reproducing this at our end.It would be great if you can share the stack trace/logs which can help us in debugging it quickly.My guess here its breaking some where while generating the class files but swallowing the error. Let us know if you have any stack trace/logs for this. Thanks, Ashudeep
Comment by Ashudeep S.
1072 | September 29, 2017 10:27:23 AM GMT
A Gentle reminder, in case you have stack-trace of the logs when the problem occurred, please share it with us.
Comment by Ashudeep S.
1073 | October 03, 2017 04:51:49 AM GMT
Hi Alexander, Are you still facing the issue ? If yes, it would be great if you can send the stack trace as we are unable to reproduce this scenario at our end. Thanks, Suchika
Comment by Suchika S.
1074 | January 23, 2018 06:35:27 AM GMT
Closing the bug for now, will re-open if we get a repro-case
Comment by Suchika S.
1075 | February 01, 2018 10:47:55 AM GMT