8

Actually not only keychain, but any other apps that request it in any way.

The problem first appeared when Adium asked me about untrusted certificates, I selected "Always trust" in system "view certificate" window, and it hung. Then I killed adium, and since then no app can access keychain.

After killing any hung app we can see the following stacktrace:

Date/Time:       2013-06-23 15:06:13 +0300
OS Version:      10.7.5 (Build 11G63b)
Architecture:    x86_64
Report Version:  9

Command:         Keychain Access
Path:            /Applications/Utilities/Keychain Access.app/Contents/MacOS/Keychain Access
Version:         5.4 (55120.6)
Build Version:   54
Project Name:    KeychainAccess
Source Version:  55120006000000000
Parent:          launchd [281]

PID:             87327
Event:           hang
Duration:        1.06s
Steps:           11 (100ms sampling interval)

Pageins:         13
Pageouts:        0


Process:         Keychain Access [87327]
Path:            /Applications/Utilities/Keychain Access.app/Contents/MacOS/Keychain Access
Architecture:    x86_64
UID:             501

  Thread 0x217de6     DispatchQueue 1
  User stack:
    11 ??? (in Keychain Access) [0x1028125e4]
      11 NSApplicationMain + 867 (in AppKit) [0x7fff8c525eac]
        11 -[NSApplication run] + 470 (in AppKit) [0x7fff8c2a99b9]
          11 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135 (in AppKit) [0x7fff8c2ad07d]
            11 _DPSNextEvent + 1247 (in AppKit) [0x7fff8c2ad9c5]
              11 AEProcessAppleEvent + 102 (in HIToolbox) [0x7fff8bf88b69]
                11 aeProcessAppleEvent + 250 (in AE) [0x7fff9848a9f7]
                  11 _ZL25dispatchEventAndSendReplyPK6AEDescPS_ + 38 (in AE) [0x7fff9848ab03]
                    11 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 200 (in AE) [0x7fff9848ac25]
                      11 _NSAppleEventManagerGenericHandler + 105 (in Foundation) [0x7fff98ccd5dc]
                        11 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 283 (in Foundation) [0x7fff98ccd74e]
                          11 __-[NSAppleEventManager setEventHandler:andSelector:forEventClass:andEventID:]_block_invoke_1 + 101 (in Foundation) [0x7fff98cce7c7]
                            11 -[NSObject performSelector:withObject:withObject:] + 65 (in CoreFoundation) [0x7fff92e3a541]
                              11 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 330 (in AppKit) [0x7fff8c2b05b9]
                                11 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 242 (in AppKit) [0x7fff8c2b0858]
                                  11 -[NSApplication _sendFinishLaunchingNotification] + 78 (in AppKit) [0x7fff8c2b1b91]
                                    11 -[NSApplication _postDidFinishNotification] + 212 (in AppKit) [0x7fff8c2b1e2b]
                                      11 ??? (in Keychain Access) [0x102826c60]
                                        11 -[NSNotificationCenter postNotificationName:object:userInfo:] + 65 (in Foundation) [0x7fff98c97fc3]
                                          11 _CFXNotificationPost + 2634 (in CoreFoundation) [0x7fff92df07ba]
                                            11 __-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_1 + 47 (in Foundation) [0x7fff98cabd0e]
                                              11 ??? (in Keychain Access) [0x1028219de]
                                                11 ??? (in Keychain Access) [0x10281ee53]
                                                  11 ??? (in Keychain Access) [0x102844138]
                                                    11 ??? (in Keychain Access) [0x10284431c]
                                                      11 -[NSTableView _doSelectIndexes:byExtendingSelection:indexType:funnelThroughSingleIndexVersion:] + 2915 (in AppKit) [0x7fff8c415eb5]
                                                        11 -[NSTableView _enableSelectionPostingAndPost] + 425 (in AppKit) [0x7fff8c3edb0a]
                                                          11 -[NSTableView _sendSelectionChangedNotificationForRows:columns:] + 203 (in AppKit) [0x7fff8c417049]
                                                            11 ??? (in Keychain Access) [0x102826be2]
                                                              11 ??? (in Keychain Access) [0x102826c60]
                                                                11 -[NSNotificationCenter postNotificationName:object:userInfo:] + 65 (in Foundation) [0x7fff98c97fc3]
                                                                  11 _CFXNotificationPost + 2634 (in CoreFoundation) [0x7fff92df07ba]
                                                                    11 __-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_1 + 47 (in Foundation) [0x7fff98cabd0e]
                                                                      11 ??? (in Keychain Access) [0x102843fbe]
                                                                        11 ??? (in Keychain Access) [0x1028197e5]
                                                                          11 ??? (in Keychain Access) [0x10281970e]
                                                                            11 ??? (in Keychain Access) [0x1028198ed]
                                                                              11 ??? (in Keychain Access) [0x102823ee9]
                                                                                11 ??? (in Keychain Access) [0x10282de5c]
                                                                                  11 ??? (in Keychain Access) [0x10282e18b]
                                                                                    11 ??? (in Keychain Access) [0x10282ca56]
                                                                                      11 ??? (in Keychain Access) [0x10282d259]
                                                                                        11 +[SFCertificateView attributedCertificateName:showsStatus:showsIssuer:selected:prefix:] + 426 (in SecurityInterface) [0x7fff908f7ca6]
                                                                                          11 -[SFCertificateData statusString] + 46 (in SecurityFoundation) [0x7fff92373838]
                                                                                            11 -[SFCertificateData evaluateStatus] + 136 (in SecurityFoundation) [0x7fff923738ee]
                                                                                              11 -[SFCertificateData certStatusFromDomainTrustSettings:isMixed:hasBasic:names:] + 115 (in SecurityFoundation) [0x7fff92374c86]
                                                                                                11 SecTrustSettingsCopyTrustSettings + 34 (in Security) [0x7fff8e1ae138]
                                                                                                  11 _ZL19tsCopyTrustSettingsP23OpaqueSecCertificateRefjPPK9__CFArrayPPK8__CFDate + 49 (in Security) [0x7fff8e1adfe6]
                                                                                                    11 Security::KeychainCore::TrustSettings::CreateTrustSettings(unsigned int, bool, bool, Security::KeychainCore::TrustSettings*&) + 365 (in Security) [0x7fff8e130369]
                                                                                                      11 ocspdTrustSettingsRead + 111 (in Security) [0x7fff8e13055a]
                                                                                                        11 ocsp_client_trustSettingsRead + 141 (in Security) [0x7fff8e1307c9]
                                                                                                          11 mach_msg_trap + 10 (in libsystem_kernel.dylib) [0x7fff9781267a]
  Kernel stack:
    11 hndl_mach_scall64 + 19 (in mach_kernel) [0xffffff80002daec3]
      11 thread_set_child + 336 (in mach_kernel) [0xffffff80002aef10]
        11 mach_msg_overwrite_trap + 184 (in mach_kernel) [0xffffff800021bbd8]
          11 ipc_kmsg_send + 416 (in mach_kernel) [0xffffff80002149e0]
            11 ipc_mqueue_send + 306 (in mach_kernel) [0xffffff8000215d72]
              11 thread_block_reason + 299 (in mach_kernel) [0xffffff800022f42b]
                11 thread_continue + 1661 (in mach_kernel) [0xffffff800022f1ad]
                  11 machine_switch_context + 361 (in mach_kernel) [0xffffff80002c2939]
 ... some lines of code stripped, full version here http://pastebin.com/HMS38f1g

I found some other reports on the internet, but all of them said 'after that everything began to fail so we've reinstalled Lion'. But I don't like this option, there should be some way to manually delete a failing certificate.

1
  • 1
    A quick fix for the dialog is (usually): sudo pkill SecurityAgent
    – docwhat
    May 1, 2015 at 15:04

2 Answers 2

5

I always get this problem when using Remote Desktop. Even though race_carr's answer to reset the keychain will likely work, I think the process is too destructive. What I just did was go into keychain and clean up the login->certificates section by removing duplicate, untrusted, and old certificates. That fixed the freezing problem.

1
  • 1
    Thanks for this, I visited the KeychainAccess and saw I had already trusted the RDP host, but with another IPadress. I removed this cert and now iy works again :)
    – DagW
    May 8, 2015 at 7:44
3

I would recommend resetting to a new/default keychain and see if that resolves the issue. Keep in mind that any stored passwords, keys, secure notes, or certificates will be deleted when you do this.

In Keychain Access.app under Preferences choose "Reset My Default Keychain" and then restart (for good measure). See also: Reset Mac OS X Keychain.

3
  • Thank you race_carr. I have been fighting with this problem for months!
    – user77084
    Apr 30, 2014 at 15:07
  • Maybe an up vote?
    – race_carr
    Apr 30, 2014 at 15:23
  • 2
    Just to add to this, if you can access Keychain Access long enough you can also use Keychain First Aid (under the Keychain Access menu) to verify and if needed repair your keychain.
    – Mr Rabbit
    Apr 30, 2014 at 15:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .