MacBook Pro keeps freezing, could Google Update be the cause?

Last Dec (2012) my MacBook Pro (OS X Lion) started freezing, say 3 or 4 times a session. I ran both the Apple hardware diagnostic DVD (ran for hours, no problems), and I ran a disk scan, no problems found.

The kernel.log message turns up these messages, at every single crash:

Dec 13 07:29:27 Gord-Waits-MacBook-Pro kernel[0]: CODE SIGNING: cs_invalid_page(0x1000): p=809[GoogleSoftwareUp] clearing CS_VALID
Dec 13 07:41:17 Gord-Waits-MacBook-Pro kernel[0]: CODE SIGNING: cs_invalid_page(0x1000): p=839[ksadmin] clearing CS_VALID
Dec 13 07:41:18 Gord-Waits-MacBook-Pro kernel[0]: CODE SIGNING: cs_invalid_page(0x1000): p=840[ksadmin] clearing CS_VALID

If you google for GoogleSoftwareUp you find a number of internet posts with the same problem. I found one page that suggested I turn off the update by issuing this command:

defaults write com.google.Keystone.Agent checkInterval 0

which is supposed to disable auto google updates completely.

That drastically reduced the crashes, but I still get a crash about once or twice a week, with the same Google Update related messages.

Anyone have any new ideas?

I suppose I should uninstall Chrome altogether next..


Solution 1:

These misbehaviours seem to come from a Google software update agent.

If this command:

launchctl list | grep google

tells:

-       0       com.google.keystone.user.agent

Then you may temporarily stop this agent with:

cd ~/Library/LaunchAgents
launchctl unload -S aqua com.google.keystone.agent.plist

On the system (where I do have regular crashes since the installation of this agent: Snow Leopard) I noticed that this plist is starting an executable located here:

~/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/GoogleSoftwareUpdateAgent.app/Contents/MacOS/GoogleSoftwareUpdateAgent

which is a universal binary dating from May 2012:

file GoogleSoftwareUpdateAgent 
GoogleSoftwareUpdateAgent: Mach-O universal binary with 2 architectures
GoogleSoftwareUpdateAgent (for architecture i386):      Mach-O executable i386
GoogleSoftwareUpdateAgent (for architecture ppc):       Mach-O executable ppc

Hence I'm tempted to conclude that this agent is using obsolete code and should be removed.

I removed this agent so as not to see it again on my next session with:

cd ~/Library/LaunchAgents
chmod 0 com.google.keystone.agent.plist

Tested with a new session. I have no more CODE SIGNING: cs_invalid_page(0x1000):[…]

Solution 2:

Eventually I discovered that both Chrome and Chromium had an instance of Google Update running in parallel, and they weren't playing well together(I'm 90% positive, but not 100%. Grain of salt required).

One at a time I uninstalled each Google App the Macbook stopped crashing.

When I got rid of Chrome I still had crashes and a copy of Google Update running. That's when I remembered I had Chromium installed.

After I uninstalled both Chrome and Chromium my Macbook became stable again. I left it for a week, then installed vanilla Chrome, things were still fine. A week later I installed Picasa, still ok.

Still ok now after a few months.