MacOS – Securityd process uses 100% CPU when Mail app is open

macbook promacosmail.app

I have a Macbook Air mid 2011 with OS X Yosemite. For a couple of weeks, I have a process, called Securityd, that runs and uses 100% of my processor, making it hot and noisy.

After some time, I discovered that the process is launching when I open the (native) Mail application. However this is not always happening. I am not sure of what makes it run, but it stops instantly when I quit the Mail app.

Do you have any idea of why this process is running, and how to fix it?

The Console.app shows nothing when I filter it with "Security". However, without filtering, when the process launch, I have this, which is looping infinitely :

25/05/15 09:57:39,166 icbaccountsd[1816]:  SOSCCThisDeviceIsInCircle 
SOSCCThisDeviceIsInCircle!! 418
25/05/15 09:57:39,531 icbaccountsd[1816]:  SOSCCThisDeviceIsInCircle SOSCCThisDeviceIsInCircle!! 419
25/05/15 09:57:39,846 accountsd[1807]: Enter ShareKitAccountEnabler  - didChangeWithType - type=2 for account myemail@address.com (E0AAB503-12B6-4E2D-B519-10A05E4C7A2A).
25/05/15 09:57:39,846 accountsd[1807]: AIDA Notification plugin running
25/05/15 09:57:39,972 accountsd[1807]: Enter ShareKitAccountEnabler  - didChangeWithType - type=2 for account myemail@address.com (E0AAB503-12B6-4E2D-B519-10A05E4C7A2A).
25/05/15 09:57:39,973 accountsd[1807]: AIDA Notification plugin running

Best Answer

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.