Mail and Safari hang on quit, plus other symptoms
So, this has been going on since updating my mid-2012 MBP (non-retina) from 10.8.5 to 10.9, including new versions of Mail and Safari. My sole email account in Mail is my iCloud account, using a .me domain. When I first boot up, everything is fine. I open mail, it's gets messages, I can send messages as well, and the app can be quit normally. Same with Safari, works ok, can be quit normally. Then, after a few minutes up system uptime, there are 3 symptoms, and I think they're all related to one underlying problem, maybe having to do with the local iCloud settings/account stuff:
1. Opening Mail doesn't result in a crash, and the activity window immediately shows activity as usual, but none of that activity completes, starting with "opening mailbox". Mail can be operated during this time, menus accessed, but nothing can be sent or received of course. Going to Mail's prefs works ok, until I go to the Accounts tab, then the whole app hangs. Trying to quit Mail fails, resulting in a hang as well, and only force-quitting gets out of the hang.
2. Safari launches ok, and browses ok as well, hangs on quit, same as Mail.
3. Opening System Prefs works ok, and opening all pref panes works ok except for iCloud and Internet Accounts. Attempting to open either of those results in the System Prefs app hanging, requiring a force quit.
Relaunching Mail or Safari or System Prefs will give the same results over and over, until I reboot from scratch and things work normally for a very short period of time again.
Extra details: When Mail or Safari hang on quit, the Activity Monitor doesn't show excessive CPU usage from them. However, when the System Prefs app hangs, the Activity Monitor shows around 99% CPU usage by the Systems Prefs app.
No idea what to do about any of this. Anyone have any ideas? The hardest part of posting here is to come up with a subject line that'll be found by people searching for similar issues!
MacBook Pro (15-inch Mid 2012), OS X Mavericks (10.9), 8GB RAM + 750GB HD