MacOS High Sierra – SafariBookmarksSyncAgent CPU problem (updated 20180321)

Edit – 20180321

Late yesterday afternoon this problem came back. Turning off Safari sync in the iCloud cdev treats the symptom but its not the cure.

Root cause found. Information below updated to reflect the final fix.

Fault Description

For an unknown reason the SafariBooksmarksSyncAgent process is consuming large amounts of CPU and memory on my 2012 MacBook Pro 15”.

Observed Behaviour

The process can be killed using Activity Monitor but will restart when Safari is open. If Safari is closed then the sync process doesn’t restart. showed the following warnings and errors:

XX BAChangeCopyChangedItem: BAChange object created with UUID that does not correspond to a known bookmark.
Move change <BAChange 0x7fc580b014b0 (0x7fc580cb0450 85087F40-FD87-4FDB-B101-713F9FCD1AA3) Modify> was provided without a corresponding changed item.
Batch record save operation completed but failed to save records due to unrecoverable error: Error Domain=CKErrorDomain Code=12 "Request UUID: (null)"
Did fail to save record batch with error: Error Domain=CKErrorDomain Code=12 "Request UUID: (null)"
Sync coordinator failed to sync bookmarks with error: Error Domain=CKErrorDomain Code=12 "Request UUID: (null)"
*** CloudKit bookmark sync failed with result <3>: Error Domain=CKErrorDomain Code=12 "Request UUID: (null)"

So obviously the sync agent has some problems.

Getting Close

Some Googlephoo turned up a few items that were close but nothing that really seemed to me like a root cause fix. Eventually I found an article that led me to this Apple support article: Resolve issues caused by changing the permissions of items in your home folder

That seemed like a worthy fix to try since I had just rebuilt my Mac from scratch and started with a fresh and new user profile. It was highly likely that some home directory permissions got clobbered during my various file restores, especially related to the hidden ‘~/Library’ folder.

I performed the steps as described however it didn’t seem to fix it. The sync process was still chewing high CPU.

The Fix Part 1

I closed Safari and reran the Apple support fix steps.
When I started Safari again the sync process was perfectly behaved. For a short while. Read on.

The Fix Part 2

So, soon after posting this article the problem came screaming back. Same fault as originally described.

This time I nuked the site from orbit.

  • In Safari on my Mac I exported my bookmarks. File -> Export Bookmarks.
  • I turned off Safari iCloud Sync on the Mac and my devices.
  • I deleted all Bookmarks from all devices and then properly closed Safari on all devices.
  • Waited five minutes.
  • Opened the and watched the logs for any process with the word safari in it.
  • Turned on Safari in the iCloud cdev on the mac and my devices. Watched a bunch of stuff scroll by in the None of it appeared to be warnings or errors.
  • Waited five minutes.
  • Imported my bookmarks from the backup file.

Root cause? Unknown. Problem fixed? Yes.

A side effect

Immediately following the fix a bunch of ‘mds’ related processes started churning. These are processes related to the Spotlight app and are part of Spotlight’s discovery and search of data on the computer. Obviously the permissions fix also fixed a bunch of access issues for Spotlight. I left it alone to chug along and it settled down to more normal levels after a short while.


2 Responses to MacOS High Sierra – SafariBookmarksSyncAgent CPU problem (updated 20180321)

  1. Mark Miro says:

    I just tried this and it worked! Thanks for sharing this.

    I thought I might have to also delete my reading list, but I guess I didn’t have to do that.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: