Wednesday, July 22, 2015

How GDB help with trouble shooting with my Google Chrome crashes

   I have been running Google Chrome (Version 40.0.2214.111 (64-bit)) on Ubuntu 12.04.   Recently my Google chrome starts crashing unexpectedly. What was worse:  when I restarted Chrome browser and clicked the "Restore" button, it ran for a moment (trying to recover all the tabs) and crashed again!   This repeats every time when I try to restore all my tabs.   It was so frustrating!

   Googled a lot and tried different remedies but none helped.   Finally figured out a way to restore most of my tabs.  Here is what I did

  • Start Chrome browser, it will have the button "Restore", don't click it yet!
  • Type Shift + Esc keys to bring up Chrome Task Manager. There should be multiple entries there,   find the processId for the Browser row (typically the first row),
  • In a terminal, type the following command:
    gdb -p <processId>      
  • Type "c" to continue
  • Now click the "Restore" button, wait a moment for all the tabs to recover.
     If it doesn't crash, congratulation!  You have "restored" all the tabs, you can type "ctrl-c" and "q" in the debugger to exit and continue to use your Chrome.  If it crashes again,  you will see it in the debugger window.  The browser window will not disappear thanks to the debugger.  Now you can see some tabs are still trying to recover (they have a spinning arc on that tab).  You would need to close those tabs.  Now type "q" in the debugger console to exit and retry the restoration process without the debugger.   For me, I lost 2 tabs among the 30+ tabs  but it's so much better than losing all the tabs!

    Hope this helps you trouble shooting your Chrome browser!

No comments:

Post a Comment