tracker issue : CF-3842800

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

ColdFusion breaks itself when the disk fills up

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/

Reporter/Name(from Bugbase): Tom Chiverton / Tom Chiverton (Tom Chiverton)

Created: 10/24/2014

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 / Linux All

Vote Count: 3

Problem Description:
When the disk containing the CF install root has no disk space, CF still attempts to rewrite various neo*xml files, creating empty or partial versions, which will break CF on restart.
This includes files that should never change during normal use such as neo-drivers.xml

Steps to Reproduce:
Start CF
Fill the disk
Stop CF
Empty disk
Start CF

Actual Result:
CF fails to start with XML parse errors

Expected Result:
CF should 
* buffer the files to memory before writing in a single atomic operation, rather than streaming them out and risking creating partials.
* not write new versions of files like neo-drivers or neo-datasource unless something in the admin alters them.
* recover from parse errors on startup e.g. start the DataSource service with no datasources, rather than not starting that part of CF at all. At least the end user can recreate them in the CFIDE vs. having to dive into the guts of CF.

Any Workarounds:
If you are lucky, the auto created .bak versions will be OK. More often than not they are broken too.

Every Linux CF install I have ever seen has had this issue at some point. It's not always because the disk filled up, though that's the easiest way to trigger it. Sometimes the files just get corrupted during shutdown, again, because they are being rewritten even if nothing changed.

The fact that there are still .bak files created by CF in CF11 means this long standing issue (at least since CF9) has been sticky plastered over rather than correctly fixed. Let's take a proper look at this.

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

Watson Bug ID:	3842800

Deployment Phase:	Pre-Alpha

External Customer Info:
External Company:  
External Customer Name: ChivertonT
External Customer Email:  
External Test Config: CentOS and Ubuntu as well as RHEL



Wow. Amateur hour. Obviously if one lets the disk get full, that's yer own fault. But the issue here is the file-writing process on the ColdFusion end is too fragile.
Vote by External U.
10488 | October 24, 2014 03:19:59 AM GMT
Yes, we are looking into this bug..
Comment by External U.
10484 | October 27, 2014 08:40:01 AM GMT
We also see this issue - but not always when the disk fills up. Partial file writing or empty neo*.xml files occur under various conditions.
Vote by External U.
10489 | October 29, 2014 11:01:52 AM GMT
You can also see this while importing DSNs on initial install. The file is repeatedly set to zero size than gradually expands, then reset to zero (when setDsn() is called again ?).
Comment by External U.
10485 | November 10, 2014 09:03:30 AM GMT
1. This is a very rare case scenario. The user should take care of having enough minimum disk space for ColdFusion to function correctly. As, some empty disk space is needed in several critical situations such as: a. Writing Configuration files b. Saving Compiled Classes c. Writing temp files for services like pdf generation etc. Thus, for the all these (and more) services to run correctly, certain amount empty disk space is needed. 2. In case of having very little free disk space, the issue of having partially written files can arise not only in writing fresh configuration files, but while creating a backup of these files as well as creating a working copy from the backup files. Hence, there is no foolproof way to avoid this situation. 3. Also, the suggestion of starting CF server with no datasources is not very feasible, as in that situation, issues will arise as to why coldfusion is removing the current datasources. Also, in that scenario, it will be difficult to track down the reason for the deletion of all the current datasources
Comment by Nikhil S.
10486 | November 24, 2014 04:38:47 AM GMT
Why can't CF just check for enough space before (trying to) write the new XML files ?!?
Comment by External U.
10487 | December 01, 2014 11:08:17 AM GMT
We just experienced this issue on a Linux box running CF 11. Our disk became full and after recovery, our scheduled tasks page was unable to load in the CF Admin. We determined this was because neo-cron.xml was only partial written, probably when our disk became full. The backup file for neo-cron.xml was blank and we were forced to re-create our scheduled tasks manually.
Vote by External U.
10490 | October 12, 2015 08:21:11 AM GMT