1. October 13, 2009

      Safari Crashes, PubSubAgent has issues, everything dies, oh my!

      Ever had one of those days, where everything just seems to be going wrong? Over the last 6 hours, I’ve been trying to debug why Safari, Mail.app, iTunes and Adium crash without ANY explanation, after any of said applications tried to load a webpage.

      It started randomly (haven’t made major changes in the last few days), so I assumed it was something corrupted. The only hint was that after Safari, Mail, iTunes or Adium crashed, PubSubAgent would use 100% CPU time. So, I fire up Instruments and look at the trace for PubSubAgent. It seems to be calling CFHTTPCookieStorageFlushCookieStores many times, which is odd, because a quick Google doesn’t return anything useful about this system call, obviously related to CFHTTP.

      Fast forward 4 hours later when I’ve cleared caches, nuked my Safari config, tried removing PubSubAgent (which just made it worse). The fix? Removing ~/Library/Cookies/Cookies.plist. Oddly enough, it has a companion – ~/Library/Cookies/Cookies.plist – corrupt.

      So, just a recap; somewhere the system knew my Cookies file was corrupted. But instead of spitting this out to the Console, throwing a Dialog, or ANY form of useful information, I had to trudge through my Library looking for something which could be causing the problem, and manually removing it. It was by chance that I noticed the Cookies folder, which is strangely not in the Safari folder where one would normally expect it.

      And just to make matters worse; Safari’s “Reset Safari” did nothing to solve the problem. That’s right, checking the “Remove all cookies” checkbox did NOT remove the cookies!

      Good user interaction FTW!

      6 Responses to “Safari Crashes, PubSubAgent has issues, everything dies, oh my!”

      1. Gary says:

        You’re my hero. Not one post came close to having a solution. all the experts at Just Answer.com kept me busy for 5 hours and even had me move or delete every .plist file except this one. Like magic, I’m goo to go. thanks so much.

      2. daniel says:

        awesome. thanks

      3. Rushabh says:

        Sweet $DEITY. Thank YOU.

      4. Ben says:

        You are my hero!!! I spent all day working on this before I noticed the pubsubagent connection but I don’t think I would have ever figured out how to fix it if it weren’t for your post. Thanks!!!

      5. Ovidiu says:

        I have the same problem, with PubSub Agent at 100% CPU. tried many thnigs, hoped this ould work. It did not… after removing ~/Library/Cookies/Cookies.plist system worked nice for about 10 min and then… same problem over again. Any other ideea?
        Thank you all

      6. jlaundry says:

        Hmmm… have you tried searching for “corrupt” in ~/Library or /Library?

        Sorry, I only encountered this problem once.

      Leave a Reply