RESOLVED FIXED Bug 37859
DumpRenderTree should save a stack trace and/or dump file when it crashes
https://bugs.webkit.org/show_bug.cgi?id=37859
Summary DumpRenderTree should save a stack trace and/or dump file when it crashes
Adam Roben (:aroben)
Reported 2010-04-20 07:57:34 PDT
DumpRenderTree should save a stack trace and/or dump file when it crashes. This would make tracking down crashes on the bots muuuuuuuuch easier!
Attachments
Teach run-webkit-tests, DumpRenderTree, and WebKitTestRunner how to save crash logs on Windows (8.63 KB, patch)
2010-08-17 12:32 PDT, Adam Roben (:aroben)
sam: review+
Adam Roben (:aroben)
Comment 1 2010-04-20 07:58:12 PDT
Adam Roben (:aroben)
Comment 2 2010-04-21 15:16:05 PDT
Chromium's test_shell does this via Google Breakpad.
Adam Roben (:aroben)
Comment 3 2010-08-17 07:43:29 PDT
I think we could do this by setting cdb or ntsd as the postmortem debugger in run-webkit-tests. This command: ntsd.exe -iaec "-lines -c \"!analyze -vv;~kpn" causes ntsd to set itself as the postmortem debugger, and, when invoked, prints an analysis of the crash and the stack traces of all threads. We just need to figure out how to get it piped to a file. If Debugging Tools for Windows is installed, we should use the version included in it, since it will likely be newer than the version in system32. Otherwise we can fall back to the system32 version. We'd want to install Debugging Tools for Windows on the test bots, and set up _NT_SYMBOL_PATH to point to the Safari and Microsoft symbol servers. We'd want to save/restore any existing postmortem debugger in run-webkit-tests before setting up ntsd.
Adam Roben (:aroben)
Comment 4 2010-08-17 08:07:45 PDT
(In reply to comment #3) > ntsd.exe -iaec "-lines -c \"!analyze -vv;~kpn" Whoops, that should have been ~*kpn
Adam Roben (:aroben)
Comment 5 2010-08-17 08:30:10 PDT
OK, I figured out how to save to a log file. Here's a better command: ntsd.exe -iaec "-lines -c \".logopen /t c:\cygwin\tmp\layout-test-results\DumpRenderTree.txt;!analyze -vv;~*kpn;.kill;q\"" That will save crash logs to the layout-test-results directory with names like DumpRenderTree_033c_2010-08-17_11-20-29-577.txt.
Adam Roben (:aroben)
Comment 6 2010-08-17 12:32:24 PDT
Created attachment 64618 [details] Teach run-webkit-tests, DumpRenderTree, and WebKitTestRunner how to save crash logs on Windows
Sam Weinig
Comment 7 2010-08-17 13:22:50 PDT
Comment on attachment 64618 [details] Teach run-webkit-tests, DumpRenderTree, and WebKitTestRunner how to save crash logs on Windows > diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp > index b2aa836dc4ca126c4e3287d52161fc7423c744a6..24019390b32dfca7f3a532690f3fee164e4c144a 100644 > --- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp > +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp > @@ -111,6 +111,7 @@ void InjectedBundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messag > WKRetainPtr<WKStringRef> ackMessageBody(AdoptWK, WKStringCreateWithCFString(CFSTR("BeginTest"))); > WKBundlePostMessage(m_bundle, ackMessageName.get(), ackMessageBody.get()); > > + CRASH(); This seems like a bad idea. Otherwise, r=me.
Adam Roben (:aroben)
Comment 8 2010-08-17 13:31:06 PDT
(In reply to comment #7) > (From update of attachment 64618 [details]) > > diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp > > index b2aa836dc4ca126c4e3287d52161fc7423c744a6..24019390b32dfca7f3a532690f3fee164e4c144a 100644 > > --- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp > > +++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp > > @@ -111,6 +111,7 @@ void InjectedBundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messag > > WKRetainPtr<WKStringRef> ackMessageBody(AdoptWK, WKStringCreateWithCFString(CFSTR("BeginTest"))); > > WKBundlePostMessage(m_bundle, ackMessageName.get(), ackMessageBody.get()); > > > > + CRASH(); > > This seems like a bad idea. Whoopsie! > Otherwise, r=me. Thanks!
Adam Roben (:aroben)
Comment 9 2010-08-17 13:51:31 PDT
Note You need to log in before you can comment on or make changes to this bug.