Corrupted CloudKitMetadata database causes cloudd to crash repeatedly and slow down folder operations
| Originator: | adam | ||
| Number: | rdar://20509461 | Date Originated: | 11-Apr-2015 06:11 PM |
| Status: | Duplicate/19773164 | Resolved: | |
| Product: | OS X | Product Version: | OS X 10.10.3 (14D131) |
| Classification: | Other Bug | Reproducible: | Not Applicable |
Summary:
Somehow, the file ~/Library/Caches/CloudKit/CloudKitMetadata got corrupted:
~/Library/Caches/CloudKit$ sqlite3 CloudKitMetadata
SQLite version 3.8.5 2014-08-15 22:37:57
Enter ".help" for usage hints.
sqlite> .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
/**** ERROR: (10) disk I/O error *****/
ROLLBACK; -- due to errors
sqlite>
This causes cloudd to crash and be relaunched repeatedly, and causes Finder and Save/Open panels to be very slow to display folder listings. This is not caused by disk performance because there are no such problems at the command line and in other situations that don't involve Finder or Save/Open panels (such as File --> Open Recent and File --> Save).
Steps to Reproduce:
1. Set up iCloud as per usual.
2. Corrupt CloudKitMetadata somehow.
3. Cause cloudd to be relaunched so it loads the corrupted database (ie, log out, or `launchctl stop com.apple.cloudd`).
4. Navigate folders in Finder or a Save/Open panel. Additionally, watch the syslog and notice cloudd crash and relaunch repeatedly.
Expected Results:
cloudd determines that the database is corrupted, deletes it, and creates a new one. As far as I can tell, when CloudKitMetadata doesn't exist, cloudd creates it and retrieves data from iCloud.
Actual Results:
cloudd throws an exception, and is repeatedly relaunched by launchd, causing an infinite loop. This requires user intervention to manually delete CloudKitMetadata{,-shm,-wal}. While cloudd is in this state, it causes Finder and Save/Open panels to be slow to display folder listings, between a few seconds to around 30 seconds.
Version:
OS X 10.10.3 (14D131)
Notes:
Configuration:
I don't know how to reproduce this. It seems from these two threads that it might be related to Safari – I typically use Chrome, but I certainly did open Safari at least once: https://discussions.apple.com/thread/6667489, http://talk.tidbits.com/cloudd-app-quits-td4668122.html. I can't reproduce this even after using Safari for some time on the final 10.10.3 release.
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!