40

We have a single page application that randomly crashes the whole browser tab. I observed the memory for more than an hour but it wasn't increasing and everything looks just fine. Than out of a sudden after some more time passes, the tab crashes.

I looked for a crash dump in

C:\Users\cburgdorf\AppData\Local\Google\CrashReports

but the Chrome-last.dmp is totally outdated. Is there any place where I can look for additional information about the crash? Not to mention it's a hard to reproduce beast.

I wonder if I could start Chrome with windbg attached and wait (2 hours or so sigh) for the tab crash. Would that work?

UPDATE

All of you gave good answers and provided valueable advice for bug hunting. In the end I was able to reproduce the bug and get a clear crash dump using the following steps:

1.) windbg.exe -o chrome.exe
2.) reproduce crash
3.) .dump /ma C:\Path\To\A\CrashDump\File.dmp (as Paul pointed out)
4.) end session and load the crash dum with windbg
5.) use !analyze -v to extract valuable information
Christoph
  • 26,519
  • 28
  • 95
  • 133
  • Would the crash dump be useful for debugging why my javascript is crashing chrome? It seems a dump is going to be pretty low-level, I'm not sure I could even find out what the javascript runtime is doing. – Frank Schwieterman Aug 20 '13 at 20:46
  • No, but you can at least get the idea of the nature of the crash. E.g. If it's memory leak related which in 99 % of the time is the case. – Christoph Aug 20 '13 at 20:53
  • What do I do if the chrome throws an exception before starting? How do I debug then? – Tomáš Zato Apr 22 '14 at 21:43

4 Answers4

7

Once WinDbg breaks in, use this command to create a full crash dump:

.dump /ma C:\Path\To\A\CrashDump\File.dmp
Ana Betts
  • 73,868
  • 16
  • 141
  • 209
  • For some reason, the `.dump` command doesn't seem to exist on my system, so how can I install it? – Lucas Jan 11 '14 at 22:52
  • 1
    I also don't understand what that command is supposed to be. Clearly, it's not part of Windows, so it's worth `-1`. – Tomáš Zato Apr 22 '14 at 16:33
  • 4
    Did you read the "Open Windbg" part? I give your attention to detail a -1 – Ana Betts Apr 22 '14 at 16:38
  • 2
    I can't see any "Open Windbg" part in your reply. However, I have already figured that out. Unfortunatelly, after installing whatever I hoped to be windbg, I still can't run the program from command line. I tried to search for it, but that failed too. – Tomáš Zato Apr 22 '14 at 16:55
4

If you want analyze only specific tab, you should follow below steps.

  • Open Chrome's Task Manager (View Background Pages option in menu).
  • Right click on grid and activate Process ID column.
  • And attach windbg to this pid.
cbolat
  • 86
  • 4
2

Follow the instructions on http://www.chromium.org/for-testers/bug-reporting-guidelines/reporting-crash-bug to report the renderer crash so the Chromium developers can debug it.

William Chan
  • 758
  • 7
  • 8
  • 1
    That's what I did. Unfortunatly there is no crash dump. However, I will try to run chrome with windbg directly attached. Maybe I can get the crash dump this way. – Christoph Jun 06 '12 at 07:54
  • I have no trust in chrome developers to fix anything, and I want to fix it myself in my javascript code. – Tomáš Zato Apr 22 '14 at 16:34
1

Could you try to use firebug in chrome and give me a log? http://getfirebug.com/wiki/index.php/Command_Line_API

upd. you need launch chrome with debug option.

  --enable-logging --v=1
Dmitry Zagorulkin
  • 8,370
  • 4
  • 37
  • 60
  • 1
    How am I supposed to get the log once the tab crashed. Can it be written to the filesystem? I guess when the tab crashes it will take down firebug as well. That's the same with the built in console, once the tab crashes it takes down the whole developer tools including the console. – Christoph Jun 05 '12 at 11:39
  • Ok, I enabled the logging now. Will wait for another crash to happen. Not sure what you mean with this second link. – Christoph Jun 05 '12 at 11:57