accountsd and secd high CPU usage on Catalina

Go into ~/Library/Keychains and delete the folder that represents your local keychain (the folder will have a GUID-style name). Restart your Mac and all should be dandy. Please note, you MAY lose the convenience of having (some) saved passwords, requiring you to re-enter those.

Longer read:
So it was upgrade time for my Macbook. I updated Mojave to Catalina. Coincidentally, I also had to renew my laptop’s user password (company policy) and meanwhile, also the new iOS came out (13.3).

This morning, my Macbook sounded like it was taking off. The fan was going berserk and checking the Activity Monitor, I saw that both the accountsd and the secd daemons were consistently using between 60% and 100% of CPU.

I tried enabling Keychain, as per forum posts, but it would not let me enable it. I got the spinning wheel and the process was just very slow.

I also tried signing in and out of iCloud, disabling iCloud on my iOS devices. Heck, I even changed the password for my Apple ID. All to no avail.

What eventually set me on the right track was opening Safari and going to the Passwords-tab in Preferences. It said passwords were locked and to enter the password for a user. To which I obliged, but it gave me the uh-oh shake, refusing to open the passwords.

I tried entering my old user passwords, but all to no avail. This ofcourse is very puzzling but led me to thinking that somewhere, something must be blocking access to keychain items. Could this be the reason the daemons were running amok?

So, I finally went into the terminal app and navigated to:

 ˜/Library/Keychains

In it, there were a couple of “keychain-db” files, but more importantly, a subfolder that had a GUID-like-name (ABCDE12-EFG2-21BA-……you get the idea). This folder represents your local keychain and holds your “local” items. It is a bit of a nuisance because of having to enter your passwords again, but it is safe to delete it.

Restarting the MAC then re-generated the GUID folder and the fans quieted down.

Hope this helps someone trying to fix this.

 

Actions :

$ sudo rm -R ~/Library/Keychains/xxx-xxx-xxxx-xxxxx
$ sudo reboot

 

Update :

Apple Discussion forum user Diaseb says:
I did this:

sudo -v ; killall -9 accountsd http://com.apple.iCloudHelper ;
defaults delete MobileMeAccounts ; mkdir ~/Library/Accounts/Backup ; mv
~/Library/Accounts/*.sqlite* ~/Library/Accounts/Backup/ ; killall -9
accountsd http://com.apple.iCloudHelper ; sudo reboot

once is resterted, you have to log in your apple ID and problem solved.

 

Source :

accountsd and secd high CPU usage on Catalina