Search This Blog

Monday, January 6, 2014

Google Chrome profile error on Ubuntu

Lately Google Chrome has been acting strange for me.  Every few times I would open Chrome, I would get an error that "Your profile could not be opened correctly".  However, it was very inconsistent, so the cause was hard to nail down.  When this would happen, I would get about 10 error windows stacked on top of one another, I would press OK several times, and then have to sign in to my profile again using the settings menu.  After a while this started to annoy me, so I started to hunt down a solution.

I am using Chrome 31.0.1650.63 and Ubuntu 13.04 (Xubuntu variant), although the below fixes should apply to most versions until Google fixes the issue.  To check your versions in

Chrome: Go to Settings ()  > About Chrome

Ubuntu: In terminal, lsb_release -a


The fix for me was to kill all the zombie processes that Chrome left behind from the last time(s) it ran.  The easiest way to do this is:
pgrep -l chrome

Make sure that all the processes shown are only chrome.  If they are, then:
pkill chrome


You may also try:
killall -9 chrome
Although this may not work if the pkill chrome command did not work.

You should now check that all chrome processes were killed by issuing the same pgrep -l chrome command.  If so, then restart Chrome and see if you get the same error.  If there are still processes, you may have to go in more depth to make it go away:
ps -ef | grep chrome
Many results may show up, but look for the PID, which is the second column of each line:
benmctee 11841     1  6 07:30 ?        00:02:23 /opt/google/chrome/chrome

11841 is the process ID (PID).  Issue the kill command as follows:
kill -TERM 11841
kill -SIGTERM 11841
kill -15 11841

Repeat the above kill process for each PID that appeared in the ps -ef | grep chrome command.

An alternative way to go about this is to use the top command:
top (opens the process manager)
s (goes to the sort screen)
The display will show all fields like the following window:
Notice how the top line shows %CPU on the far right.  This is what top is currently sorting by.  I don't really care at this point which process is causing the most CPU usage, since I know that we want to kill the Chrome process.  Scroll down to COMMAND, and press s.  Your window should now show COMMAND in the upper right:
Press q to get back to the main top screen.  Everything will be sorted now, but in reverse order:
 Type uppercase R to sort everything alphabetically, and then scroll down to chrome.

Notice that there are a multitude of instances that get started when Chrome runs.  To kill the processes, type k, and then enter the PID of the process you desire to kill, and then press <enter>.  To quit top, type q.

Killing each process can take some time, which is why I prefer to use the pgrep and pkill commands from earlier.

If you still have troubles with Chrome, you can follow other steps as outlined in Saravanan Thirumuruganathan's article over on Wordpress.

No comments:

Post a Comment