8 Replies Latest reply: Jan 22, 2007 12:54 AM by Rosyna
Merlin Mann3 Level 1 Level 1 (15 points)
Recently, when I update an app and get the "Confirm Application Change" dialog box (related to re-authorizing Keychain permissions), clicking "Change All" to allow the change makes some Bad Things happen.

* dialog box stays up
* beachball spins
* everything slows way way down (GUI is mostly unresponsive, apps won't launch, etc.)
* Activity Monitor shows `securityd` and `kernel-task` each rocketing up in CPU and RAM usage (each grabs over a gig of virtual RAM and double digits of processor)

Things stay this way until I Force-Quit the app trying to update. Even then it gets only a little better -- securityd and kernel_task just keep gobbling way.

Since securityd can only be launched during a reboot, this leaves my system practically useless until I restart. Sometimes the dialog box itself goes away if I wait long enough (3-5 minutes?), but the processes still tear things up until I reboot.

What I've tried so far ("+" == tried numerous times)

* Keychain repair
* Renaming Keychain
* Disk Utility "Repair Disk"
* Disk Utility "Repair Disk Permissions"
* single-user mode: `fsck -y`
* single-user mode: Applejack for disk repair, cache clearing, preference checking, etc.
* Onyx for, well, clearing practically everything
* Combo update / system update
* Archive & Install reinstallation (from Disk)

Any idea what could be causing this?

It happens constantly with my beloved Quicksilver as well as the latest update of NetNewsWire. I'm thinking that _some entry_ in `login.keychain` has gotten hopelessly corrupted and is spinning the system into a tizzy.

What are my options apart from starting my 1800-item Keychain completely from scratch? Is there something beyond Keychain First Aid for resuscitating these items?

MacBook Pro   Mac OS X (10.4.7)   2GB RAM
  • 1. Re: Updating app's Keychain access causing 'securityd' hang?
    Roger Goesele Level 1 Level 1 (0 points)
    I have the same problem.

    An updated program tries to acces the keychain and securityd hangs... using huge amount of ram and everything get's slow.

    I also tried the same stuff... even tried it with an empty keychain (even with an empty user!)... but after using a new version of a program... the problem is back!

    MacBook Pro   Mac OS X (10.4.7)  
  • 2. Re: Updating app's Keychain access causing 'securityd' hang?
    Merlin Mann3 Level 1 Level 1 (15 points)
    After a couple more days of waving a rubber chicken around, I finally rolled back to a month-old backup of login.keychain and (so far) everything seems fine again.

    Makes me think (even more) that the problem might have been a hopelessly corrupted keychain, although I'd love to hear if people have similar problems with keychains that are working on other accounts/macs.
  • 3. Re: Updating app's Keychain access causing 'securityd' hang?
    Merlin Mann3 Level 1 Level 1 (15 points)
    I still have the problems I reported here a few weeks ago with updated apps that access my keychain causing a virtual lockup on my MacBook. The remaining prominent bad actor is "Transmit" which generates this problem each time I install an update of the app. (Not to say this is Transmit's "fault," but the volume of passwords it accesses makes it the place the problem's most noticeable)

    It seems like one solution would be to simply remove the association between the problematic app and each instance of keychain item authorization. The only way I know of to do that now would be to go through each item in my 1,000+ item keychain, check "Access Control" for the errant app, remove the app (which takes several clicks and a password entry) -- thus forcing every item to reauthorize as needed. But at least I wouldn't lose the (sometimes very old and otherwise unknown) passwords that are in my keychain.

    Is there a way to unauthorize a single app across all the entries in a keychain?
  • 4. Re: Updating app's Keychain access causing 'securityd' hang?
    Alexander Clauss Level 1 Level 1 (10 points)
    I've the same problem on my iMac (Intel, MacOSX 10.4.8). This started a few weeks ago. The exact date is unknown, because the problem shows up only when an application is updated and this application tries to access the keychain.

    Is there any solution available now? I've tried almost everything that was mentioned here (keychain repair etc), but no luck.

    The only workaround at the time is to manually update the application list for all passwords in the keychain application whenever an application is updated.

    iMac 20" (Intel)   Mac OS X (10.4.8)  
  • 5. Re: Updating app's Keychain access causing 'securityd' hang?
    Merlin Mann3 Level 1 Level 1 (15 points)
    My very unsatisfying fix was temporary and a Devil's bargain at best.

    0. Backup and zip Login.keychain (the equivalent of cryogenically freezing a sick patient in hope of a future cure)
    1. Deleted all Login keychain items older than one year (ouch)
    2. Manually opened (over 500) remaining items and removed associations with all problem apps. (So. Tedious.)
    3. Tested by launching problem apps (Success == "Re-authorize no longer pops up on launch")
    4. Repeated 2-3 til success.
    5. Re-authorized per item-app relationship as needed
    6. Slowly added old passwords back in as needed

    All seemed well until: I installed a new version opf Speed Download (a previous problem app) a few days ago, and when the "Confirm..." box popped-up, I pridefully clicked "Yes," thinking I was now fixed. Nope. I was immediately back to The Problem. Almost total lockup requiring reboot.

    I still feel like (lacking a complete cure) there should be an easy way in Keychain.app to say "Show me all items assicated with Foo.app" and then let me select and delete them all at once. My method above was unspeakably painful -- the equivalent of washing rice one grain at a time.

    Sorry you're having problems too, but I am glad to hear I'm not crazy.

    MacBook Pro   Mac OS X (10.4.7)   2 GB RAM

    MacBook Pro   Mac OS X (10.4.8)   2 GB RAM
  • 6. Re: Updating app's Keychain access causing 'securityd' hang?
    Merlin Mann3 Level 1 Level 1 (15 points)
    And I'm not above bribes: $25 Amazon gift card to the author of the comprehensive fix for this -- if it exists.

    Deleting and starting the keychain over from scratch doesn't count. But if there's something we're missing that can "fix" the keychain or track down specific corrupted items and relationships, etc. please give a holler.

    Success == 1) we get to keep non-corrupted keychain items and 2) after the fix, Confirming on new app updates doesn't trigger the problem again.

    Have at it.

    MacBook Pro   Mac OS X (10.4.8)   2 GB RAM
  • 7. Re: Updating app's Keychain access causing 'securityd' hang?
    Paul Kalas1 Level 1 Level 1 (0 points)
    I had a similar problem that I traced to keychain.app in Utilities. Basically, with Airport off, my memory was OK. But with Airport ON and restart, securityd would consume all available RAM. I deleted all keychain passwords (and tried Keychain first aid, Keychain reset, etc.) and when I next connected to my wireless network I did NOT check the "Add to Keychain" item. Yet I found that the wireless network password DID appear as a new keychain item, and the memory hog securityd persisted. The solution was to go to System Preferences and configure the Network settings for Airport so that the "Options" item "Automatically add new networks..." is UNCHECKED (the default is for it to be checked). The effect is that you can leave Airport on, but when you restart you have to select your network and type in your password. I now have other passwords in my keychain but they do not cause memory hogging. To summarize, when the Airport/WPA security password is in the Keychain, it creates a memory hog out of securityd. With my solution it takes a little longer for Airport to find networks, and you have to type in your password to your network. But, the benefits are that #1, the computer starts quickly (22 sec from power on to login, and 13 seconds from login password return key to a functioning finder window), and #2, everything will run faster because you have more free memory.

    PB Pro, 2.13 Mhz, 2 GB RAM   Mac OS X (10.4.8)   no 2006-007 security update



  • 8. Re: Updating app's Keychain access causing 'securityd' hang?
    Rosyna Level 1 Level 1 (45 points)
    I'm posting this here just so it is here.

    But the fix can be found at http://www.unsanity.org/archives/security/love_tropicana.php

    Basically, it's due to a corrupted file.

    PowerMac G5 Dual 2.0 Ghz   Mac OS 9.1.x