This is a slightly difficult issue to describe precisely but I'll do my best. About six weeks ago, my installation of Catalina (10.15.7, MacBook Pro 13" 2020 /
MacBookPro16,2) started to exhibit some strange behaviour when left running overnight (or possibly: when left running unattended for several hours).
Sometimes, but by no means every day, I'll return to the machine in the morning and wake the screen to see a grey lock screen (no background image) and a prompt that will often only accept my password (i.e. not Touch ID). Upon unlocking the machine I'll see a series of errors and password prompts, which seem to be stuck in a loop (or maybe there are just enough of them queued up that it seems like a loop). These messages include:
Unapproved caller. SecurityAgent may only be invoked by Apple software --- Unrecoverable error. SecurityAgent was unable to create requested mechanism builtin:unlock-keychain. --- accountsd wants to use the “login” keychain. Please enter the keychain password. --- callservicesd wants to use the “login” keychain. Please enter the keychain password. --- identityservicesd wants to use the “login” keychain. Please enter the keychain password. --- CallHistorySyncHelper wants to use the “login” keychain. Please enter the keychain password. --- assistantd wants to use the “login” keychain. Please enter the keychain password. --- CommCenter wants to use the “login” keychain. Please enter the keychain password.
The system will give the appearance of being usable but isn't really. Symptoms include:
- Finder and Dock repeatedly restarting
- Generally unable to interact with menubar, e.g. to shut down
- Inconsistent ability to tab between apps and interact with or quit them
- Unable to start new apps from Dock or menubar shortcuts (icons just bounce for a while)
So far I have never been able to cleanly shut down the machine in this state and have had to power it off using the Touch ID / power button.
When booting back up, everything seems fine except sometimes Touch ID preferences have been reset (i.e. I have to enrol my finger again) and on one occasion my saved Bluetooth devices, except for mouse and keyboard, were deleted. For what it's worth, it does seem that if I "catch" the problem quickly enough, e.g. returning to the machine late at night, the damage is more limited and Touch ID is not always reset, however the other issues remain. I have also tried putting the machine into standby overnight by closing the lid, rather than leaving it running, but at least once the issue has still occurred (presumably the machine is waking up at some point overnight to do something).
I'm a bit stumped as to how to diagnose this. My hunch is that it's something to do with the system somehow losing access to Keychain – based on mentions in the error messages above. I did have iCloud Keychain enabled previously, but disabled it a couple of weeks ago, and the issue has happened at least once since then.
An answer to another question mentions Keychain permissions – these are mine, in case they're relevant:
# /Library/Keychains: 0 drwxr-xr-x 9 root wheel 288B 9 Feb 08:07 Keychains # /Library/Keychains/System.keychain 248 -rw-r--r-- 1 root wheel 120K 7 Jan 13:16 /Library/Keychains/System.keychain # ~/Library/Keychains/ [with redactions] total 928 0 drwx--x--x 7 james staff 224B 14 Feb 10:07 . 0 drwx------@ 85 james staff 2.7K 10 Feb 12:22 .. 0 -r--r--r-- 1 james staff 0B 7 Dec 2020 .XXXXXXXXXX 0 -r-------- 1 james staff 0B 7 Dec 2020 .XXXXXXXXXX 0 drwx------ 11 james staff 352B 14 Feb 09:06 XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX 880 -rw-r--r--@ 1 james staff 439K 14 Feb 10:07 login.keychain-db 48 -rw------- 1 james staff 23K 14 Feb 09:41 metadata.keychain-db
Any light that anyone might be able to shed on this would be much appreciated! I have a TODO list item to upgrade to Big Sur, at which stage this might become moot, but until then I would really like to understand it better and avoid having to do these forced-shutdowns every now and then.
Thanks for reading and if I can provide any more info or data please ask.