DumpRenderTree should save a stack trace and/or dump file when it crashes. This would make tracking down crashes on the bots muuuuuuuuch easier!
<rdar://problem/7883560>
Chromium's test_shell does this via Google Breakpad.
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.
(In reply to comment #3) > ntsd.exe -iaec "-lines -c \"!analyze -vv;~kpn" Whoops, that should have been ~*kpn
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.
Created attachment 64618 [details] Teach run-webkit-tests, DumpRenderTree, and WebKitTestRunner how to save crash logs on Windows
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.
(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!
Committed r65537: <http://trac.webkit.org/changeset/65537>