[FDS-39] When I use FusionDebug to debug a CF script, sometimes the JVM (ColdFusion) will exit.

Description

This is due to a Java bug (6497210, available here, fixed in Java JRE/JDK 7.0b7) which causes Java (on which ColdFusion runs) to crash during debugging. This bug may manifest itself by:

  • a simple exit of the Java Virtual Machine (if running in a Unix console or DOS Window),
  • the Windows ‘ColdFusion MX [7] Application Server’ service spontaneously stopping,
  • on Mac with a standard Mac OS X ‘Crash Reporter’ dialog

All of these exits may also be associated with a VM error message “Bus Error”.

This problem occurs if a debug client (such as FusionDebug, Eclipse, Netbeans or JDB) is reading variable values when Java attempts to clean up memory by performing a garbage collection.

On Windows, a Java Error File (hs_err_pidXXX.log) may be generated in the ColdFusionMX/runtime/bin folder. On Macintosh, a Crash Reporter log may be generated in the ~/Library/Logs/CrashReporter folder.

This problem occurs quite rarely, but could happen when performing fast stepping (by holding down the Step-Into or Step-Over key). The problem affects all Java platform debuggers, not just FusionDebug. Running in low or marginal memory situations will also greatly increase the probability of this bug occurring.

The bug occurs much more frequently on non-Windows platforms.

If you are affected by this behavior, it may be possible to alleviate the problem somewhat by increasing the memory available to Java, thereby decreasing the number of garbage collections required and the possibility of one occurring while FusionDebug is reading variables. The following procedure details this workaround.

  • Either (ColdFusion Standalone Only)
    • Open the CF Administrator
    • In the Server Settings menu, select the Java and JVM option.
    • Increase the value in the Java Maximum Heap Size field, bearing in mind the total amount of memory available on the machine.
    • Click ‘Submit Changes’
    • Restart ColdFusion.
  • Or
    • Stop the ColdFusion service.
    • Locate your JRun Java configuration file jvm.config.
    • Make a copy of this file and move the copy to a safe place. You may restore this copy in the event of problems.
    • Open the original jvm.config
    • Locate the line java.args, and within it the -Xmx option. This option tells Java how much memory to use. This line is very long – be careful not to introduce any carriage returns.
    • Increase this number, bearing in mind the total amount of memory available on the machine. E.g. to allow 500 megabytes for Java, use the option -Xmx500m
    • Save and close the file
    • Restart the ColdFusion service.

This bug has been fixed in Java version 7 (1.7), but since neither FusionDebug nor ColdFusion/JRun are supported on that platform yet, we recommend performing the workaround procedure above. There is a chance the fix will be back-ported to future Java 5 (1.5) and 6 (1.6) maintenance releases, though this is not guaranteed by Sun.

If, after performing the remedial steps above, you are still affected by this problem, please get in touch with us at Support.

Issue Details

Type: Technote
Issue Number: FDS-39
Components:
Environment:
Resolution: Fixed
Added: 18/05/2007 14:26:58
Affects Version: 2.0
Fixed Version: 2.0
Server:
Platform: Solaris, MacOS, Linux, Windows 2003, Windows 2000, Windows XP
Related Issues: None