Securityd process uses 100% CPU when Mail app is open

Solution 1:

Ok, my advice is that u should unlink your email accounts and iCloud accounts from your MacBook Air. These unlink operation are to be done on MBA's side. Here is how I reached this conclusion:

  1. securityd handles cryptographic operations on OS X. All processes communicate with securityd through SecurityAgent. That fact that these two are not throwing error in system log means something talking to them is the culprit.

  2. icbaccountsd has ur email/icloud authorization info stored. To see what I mean, terminal:

    /usr/libexec/icbaccountsd raw

and you will see your addresses in the printout.

  1. An error in the icbaccountsd doesn't necessarily mean a wrong password. It could also be a incorrect/corrupted public/private key. Or a formating error in the file (hence, the infinite loop).

So you should uncouple your emails from MBA and recouple them later. These are the measures you can take to do that, from safest to more drastic. You can do only one each time, add back your emails, and wait to see if it works. Or you can undertake all at once and add back. Needless to say, before re-adding, restart your laptop.

  1. Deactivate all accounts under System Preferences -> iCloud and Internet Accounts. (This is probably too puny to work.)

  2. Delete those accounts System Preferences -> iCloud and Internet Accounts.

  3. Open Keychain app and delete any entry related to your email addresses and email servers. These entries can be passwords, keys, certificates, etc.

  4. open ~/Library/ and back up files in ~/Library/Containers/com.apple.mail/ and ~/Library/Mail/. Delete the originals.

These would give you a machine free from any association with your emails. You many wonder if you should simply/also purge /usr/libexec/icbaccountsd. I won't recommend it til all else fails.