APFS + Content Caching results in unresponsive system and impossible amounts of available storage

Originator:j.a.grigutis
Number:rdar://39980316 Date Originated:May 4 2018, 1:20 PM
Status:Open Resolved:
Product:macOS + SDK Product Version:10.13.14 (17E202)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Area:
Something not on this list

Summary: I have been having problems with two Mac minis whose sole purpose is content caching. They would often hang or otherwise become unresponsive. See bug report # 34956416. That report was closed as being fixed, so I rebuilt these systems from scratch (Erased the HDs as APFS and installed macOS 10.13.4 from a USB drive) thinking that the problems I was still having with them might be because these systems were upgraded in-place from macOS Sierra and just needed to start from a clean slate. But I found the same problems reappear even after this fresh start.

That problem will manifest when assetcache fails to serve clients and the system itself is unreachable via ARD or SSH requiring that the system be power cycled to restore normal function. I also noticed that the available space listed in the Storage tab of "About This Mac" shows the available space being greater than the total capacity of the drive (e.g., 1TB total capacity, 1.3TB available). I also see a warning of "Overallocation Detected on Main device" for "Container disk2" when running First Aid in Disk Utility. This leads me to suspect the problem is related to how assetcache behaves on APFS volumes.

Steps to Reproduce:
Enable Content Caching on a system with an APFS boot drive. Leave the Cache Size as Unlimited (the default).

Expected Results:
Content Cache should reserve enough free space on the boot drive to allow the OS to continue to function even as the amount of usable space approaches 0.

Actual Results:
As the available space approaches 0, Content Cache fails honor the system reserved space limit (or the limit should otherwise be increased), fails to serve clients, and the system becomes unresponsive. The Finder also reports impossible amounts of available space on the internal boot drive (via the Storage tab in "About This Mac" or by Get Info on the "Macintosh HD" boot volume) and Disk Utility will show a warning of "Overallocation Detected on Main device" for the parent APFS Container.

Version/Build:
macOS 10.13.4 (17E202)

Configuration:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!