How To Stop CalendarAgent From Eating CPU

Recently ran into an issue with Calendar causing a huge CPU spike. Checking the system.log I noticed the following repeatedly in my log:

CalendarAgent[379] Unexpected EOF, returning last token as fallback

CalendarAgent is essentially Calendar’s backend (that’s how it’s also able to power the notification center). The best resolution I’ve found is to completely clear out the calendar and recreate it. Process I used was as follows:

  1. Remove the Calendar from “Mail, Contacts & Calendars” pref panel (just uncheck from the account). Then go into Calendar and make sure the account is removed. If it’s not, remove it.
  2. Delete ~/Library/Calendars/
  3. Delete ~/Library/Preferences/
  4. Go back into the “Mail, Contacts & Calendars” pref panel, put the calendar back. Give it some time to download.

That seems to have worked for me.

SVN In Mountain Lion

This one caught me by surprise. With 10.8 Mountain Lion, installing Xcode doesn’t mean tools like svn will be automatically available via command line. If you want to use svn by terminal for example you’ll have to first open Xcode, next go into Preferences and find the Downloads tab. Then install “Command Line Tools”. After a few minutes you’ll then have all the old tools you know and love available just like before.

Seems SVN is 1.6 what shipped with Mountain Lion:

$ svn --version
svn, version 1.6.18 (r1303927)
   compiled Jun 15 2012, 19:07:58

To bad it’s not 1.7. Lots of nice improvements since 1.6 shipped. Apple tends to be somewhat conservative in what it bundles, so it shouldn’t surprise anyone.

OS X 10.8 Mountain Lion

OS X 10.8 Mountain Lion is pretty nice, however I don’t think it really has a killer feature (though John Siracusa’s exhaustive review lists pretty much every change). Notification center is in my opinion the closest to it, and not for notifications itself, but because it can serve as a sort of dash board for calendar making it really accessible. I think that will change my workflow a bit. Lots of subtle UI polish which is nice and appreciated. For those who use Calendar’s location field for phone numbers it’s nice that it’s always completely visible now and never cut off. Apple’s been resolving this slowly over time. OS X 10.6 was terrible when it came to this.

I still don’t understand why my desktop picture reverts every OS upgrade. I’m also a little disappointed HFS+ hasn’t been replaced with something more modern.

Overall a smooth upgrade.

Apple Moves Towards Faster Updates

Curious note in the latest Apple Mountain Lion update:

– Daily Checks for required security updates
– The ability to install required security updates automatically or after restarting your Mac
– A more security connection to Apple’s update servers.

Clearly the trend to more rapid updates for client side software is accelerating. I’m not sure I like things being required though as updates sometimes cause problems. It’s only a matter of time before a prematurely released upgrade rapidly takes out an entire platform.

On Gatekeeper

Gatekeeper is without question a bold move to prevent malware from impacting Mac OS X, but it will likely turn into a legal and ethical mess. Before I explain why, I’ll give a very high level overview. There are three options:

  • Mac App Store – Only run applications from the Mac App Store.
  • Mac App Store and identified developers – Only run applications from the Mac App Store and developers who sign up with Apple to get a key.
  • Anywhere – This is how every Mac and PC today operates out of the box.

The default in Mountain Lion is App Store and identified developers. As MacWorld’s Jason Snell explains:

Apple says, if a particular developer is discovered to be distributing malware, Apple has the ability to revoke that developer’s license and add it to a blacklist. Mountain Lion checks once a day to see if there’s been an update to the blacklist. If a developer is on the blacklist, Mountain Lion won’t allow apps signed by that developer to run.

It’s worth noting that at least today the authentication is only done on first run from what I’ve read. However it’s not impossible for Apple to later check an application on each run to make sure it’s not on the blacklist. That could even happen before the feature ships this summer.

What’s concerning is that Apple will now essentially be the gatekeeper (get it?) and thus pressured to control what users can or can’t install on their computer. Lets be honest, most developers will never get their users to open system preferences and change this, so getting “identified” is essentially required to develop on Mac OS X if you want more than geeks to use your software.

Apple in the past has been pressured to remove Apps from the iOS App Store. It’s likely (read: guaranteed) to be pressured to blacklist developers who write apps which are controversial. Anything that could be used for piracy from a BitTorrent client to VLC which uses libdvdcss (the library hasn’t been legally challenged ever AFAIK but pressuring Apple is a way around the court system) could be targeted. Apple has a bit of a history banning apps for all sorts of reasons including being negative towards Apple.

How would Apple deal with pressure from patent claims? What about a desktop client for WikiLeaks, like the one that was pulled from the App Store? What about a game distributed by Planned Parenthood or some other organization that tends to draw controversy? There’s also the international issues here (Nazi images and Germany, privacy violations and EU). What about more indirect things like Firefox which can run 3rd party code via plugins and addons. Mozilla refused to kill MaffiaaFire. Could the Feds have went to Apple?

These are all hypothetical situations technically since the feature hasn’t even launched and Apple hasn’t given any clear policies. That in my opinion is the big problem. Apple as far as I know hasn’t given any guidelines to what would put a developer on the blacklist? Is there even an appeals process?

I’m pretty sure we’ll learn more over the coming weeks. The cool guys over at Panic are pretty optimistic about the feature, so I guess we’ll see.