Mark Jenkinson

Q: secd Process Memory Leak

Finding the secd process using 13GB of RAM was a bit of a shock. Watching its RAM consumption continue to increase, indicates a memory leak. Is this something anyone else has noticed? And any possible solutions?

iMac, OS X Yosemite (10.10), 16 GB RAM

Posted on Nov 19, 2014 1:01 PM

Close

Q: secd Process Memory Leak

  • All replies
  • Helpful answers

Page 1 Next
  • by Mark Jenkinson,

    Mark Jenkinson Mark Jenkinson Nov 19, 2014 1:23 PM in response to Mark Jenkinson
    Level 2 (285 points)
    Nov 19, 2014 1:23 PM in response to Mark Jenkinson

    Console is also filling up with the following:

     

    Wednesday, November 19, 2014 4:16:27.282 PM secd[5736]:   xv2n2c5fwNdkD6xVUecEae7nvR object 22C824DD dropping from manifest: not found in datasource

     

    And also this ominous one:

     

    Wednesday, November 19, 2014 4:11:03.349 PM secd[5736]:  SecOTRSFindKeysForMessage SecOTRSession key cache was full. Should never happen, spooky.

  • by Mark Jenkinson,Solvedanswer

    Mark Jenkinson Mark Jenkinson Nov 19, 2014 2:43 PM in response to Mark Jenkinson
    Level 2 (285 points)
    Nov 19, 2014 2:43 PM in response to Mark Jenkinson

    Having gone through all my devices and turned off iCloud Keychain sync, and then reenabling each device, has seemed to have stopped the memory leak. Hope this helps anyone else with a similar issue.

  • by Prashant Joshi,

    Prashant Joshi Prashant Joshi Nov 20, 2014 4:19 PM in response to Mark Jenkinson
    Level 1 (20 points)
    Nov 20, 2014 4:19 PM in response to Mark Jenkinson

    What exactly is secd? I can find nothing on the internet. It is using up 4.73 GB (out of 8 GB) of memory on my 17" MBP running Yosemite 10.10.1. It is only using 1.2 GB (out of 8 GB) on my retina MBP running the same OS.

  • by Mark Jenkinson,

    Mark Jenkinson Mark Jenkinson Nov 20, 2014 4:46 PM in response to Prashant Joshi
    Level 2 (285 points)
    Nov 20, 2014 4:46 PM in response to Prashant Joshi

    secd is related to keychain sync, but it should not be using more than a hundred megabytes. So both of your Macs seem to be displaying the same issue. Do you have any other devices that are, or were using icloud keychain recently? Or even a computer migration recently?

     

    Turning off keychain sync across all your devices should fix the issue. The tricky part is when you have devices that you can no longer disable keychain sync on, because you no longer have access to them. You can see all your devices that are registered to iCloud on the iCloud Settings page here https://icloud.com/#settings

     

    Hope this helps.

  • by solarnu,

    solarnu solarnu Dec 2, 2014 1:13 PM in response to Mark Jenkinson
    Level 1 (4 points)
    iCloud
    Dec 2, 2014 1:13 PM in response to Mark Jenkinson

    For a short-term fix I found that typing the following from the terminal on an affected computer

     

    launchctl stop com.apple.secd

    launchctl start com.apple.secd

     

    i.e.,stopping and restarting the secd, also seems to fix it (at least in the short term.) Mine was up to 6 GB.

  • by Prashant Joshi,

    Prashant Joshi Prashant Joshi Dec 2, 2014 1:39 PM in response to Mark Jenkinson
    Level 1 (20 points)
    Dec 2, 2014 1:39 PM in response to Mark Jenkinson

    Oddly enough, all I did was restart both affected computers and secd use went back under 20 MB and has stayed there.

  • by solarnu,

    solarnu solarnu Dec 2, 2014 1:58 PM in response to Prashant Joshi
    Level 1 (4 points)
    iCloud
    Dec 2, 2014 1:58 PM in response to Prashant Joshi

    For me the problem came back after a few days. I haven't figured out yet what triggers it.

  • by andrefromflorianopolis,

    andrefromflorianopolis andrefromflorianopolis Dec 8, 2014 1:35 PM in response to Mark Jenkinson
    Level 1 (0 points)
    Dec 8, 2014 1:35 PM in response to Mark Jenkinson

    Pra mim resolveu! Apenas desativei a sincronia de chaves

  • by Christian Riley,

    Christian Riley Christian Riley Dec 12, 2014 7:18 AM in response to Mark Jenkinson
    Level 2 (254 points)
    iPod
    Dec 12, 2014 7:18 AM in response to Mark Jenkinson

    secd was up to 29.46GB as of this morning of memory!

     

    Trying the above suggestions to resolve it.

  • by TaylorMedia,

    TaylorMedia TaylorMedia Jan 18, 2015 9:50 PM in response to Mark Jenkinson
    Level 1 (0 points)
    Jan 18, 2015 9:50 PM in response to Mark Jenkinson

    Thanks for the call-out.  I just checked, and I've got a million of 'em in my logs, too...

     

    1/18/15 10:07:09.535 PM secd[268]:  SecOTRSFindKeysForMessage SecOTRSession key cache was full. Should never happen, spooky.

     

    Not an ideal or comforting log message.  Seems definitely a bug.

  • by Mark Jenkinson,

    Mark Jenkinson Mark Jenkinson Jan 28, 2015 6:03 AM in response to Mark Jenkinson
    Level 2 (285 points)
    Jan 28, 2015 6:03 AM in response to Mark Jenkinson

    The problem returned for me with the iOS 8.1.3 and Yosemite 10.10.2 updates. On all my Macs secd was burning through memory, reaching 20GB in a few short hours. iPhone was running super hot, and battery was draining at an alarming rate. Turned off iCloud Keychain on all my devices, including four Macs, two iPhones and an iPad. To have to do this after every iOS update, as has been the case to this point, is the antithesis of what Apple is all about. The "it just works" moniker does not apply here, and this solution is one that took me many months to uncover. Not something the average user is going to know how to do. Likely, most have to get around this problem by doing a clean install of iOS. Hopefully, some find this post helpful.

  • by EaglesFanOne,

    EaglesFanOne EaglesFanOne Feb 11, 2015 7:44 PM in response to Mark Jenkinson
    Level 1 (0 points)
    Feb 11, 2015 7:44 PM in response to Mark Jenkinson

    So calling into customer support I was given a solution that may have fixed this problem.

     

    These are the steps i followed:

     

    1. Open a Finder window
    2. Click "Go" on the menubar
    3. Hold down the Option key and the Library folder will appear
    4. Click on the Library folder and look for the Keychain folder within the Finder window
    5. Drag the folder into the trash but do not empty the trash
    6. Restart your computer
    7. Keychain will be reset; there is still no need to empty the trash

     

    This fixed the problem for me at least for the short term. Hopefully it keeps things going smoothly from now on and works for everyone else.

  • by chrisheath,

    chrisheath chrisheath Apr 8, 2015 5:25 PM in response to EaglesFanOne
    Level 1 (5 points)
    Apr 8, 2015 5:25 PM in response to EaglesFanOne

    Thanks - I think this helped, but will give it a day or two to see what happens.

     

    My secd was over 32 GB the other day and the iMac wasn't quite its usual self. After restarting, secd's memory usage dropped away, but has been steadily creeping up over the last couple of days and was over 5GB this morning. So I tried dragging the Keychains folder to the trash and restarting.

     

    The thing about dragging your keychain to the trash and restarting is, on logging back in you may be asked for a pile of passwords to all your mail accounts and your keychain will be empty!

     

    I filled out all the requests for icloud passwords, but for the keychain to update properly, this took a while. I think what saved me from panicking about losing all my passwords, was going into System Preferences and signing into iCloud there. I was also requested to verify my iCloud login from another device (e.g., iPAD). I think this is what restored my keychain from the cloud.

     

    Once the keychain had updated itself, I restarted the iMac again, and Mail returned to normal (no more requests for mail account passwords).

     

    The only thing that wasn't restored after restarting was automatic keychain access to my time machine. I had to enter the password and save it to the keychain.

  • by User000000,

    User000000 User000000 Sep 22, 2016 7:55 PM in response to chrisheath
    Level 1 (8 points)
    Mac OS X
    Sep 22, 2016 7:55 PM in response to chrisheath

    Worked! At least for now...

Page 1 Next