Bug 44135

Summary: run-webkit-tests doesn't save crash logs on Windows Vista/7
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: lforschler
Priority: P2 Keywords: InRadar, PlatformOnly
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows Vista   
Bug Depends on: 55222, 55225, 55318    
Bug Blocks:    

Description Adam Roben (:aroben) 2010-08-17 16:01:11 PDT
If you run run-webkit-tests on Windows Vista or 7 you'll see a message like:

Crash logs will be saved to /tmp/layout-test-results.

But no crash logs are ever actually saved. I think this is because regtool is failing to set the appropriate registry keys because it isn't being run as an administrator.
Comment 1 Adam Roben (:aroben) 2010-08-17 16:01:40 PDT
<rdar://problem/8321627>
Comment 2 Adam Roben (:aroben) 2010-12-12 13:00:49 PST
It looks like there are three issues:

1) We need administrator privileges to modify the registry
2) We need to set keys in WOW6432Node
3) Under Cygwin 1.7, crashes in applications launched by Cygwin are caught and ignored

(2) applies to any 64-bit OS, including XP.
(3) applies to any OS, even 32-bit ones.
Comment 3 Adam Roben (:aroben) 2011-02-25 06:04:11 PST
(In reply to comment #2)
> 1) We need administrator privileges to modify the registry

We can work around this by turning off UAC on the bots. Another option would be to set up the post-mortem debugger registry keys manually, and have them look for a command file in a predetermined location on disk. old-run-webkit-tests could then write the command file to that location, and not try to modify the registry at all.

> 2) We need to set keys in WOW6432Node

We can achieve this by passing --wow32 to regtool.

> 3) Under Cygwin 1.7, crashes in applications launched by Cygwin are caught and ignored

It looks like Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which causes this behavior. We can work around it by calling ::SetErrorMode(0) when DRT launches.
Comment 4 Adam Roben (:aroben) 2011-02-25 08:58:07 PST
(In reply to comment #3)
> > 3) Under Cygwin 1.7, crashes in applications launched by Cygwin are caught and ignored
> 
> It looks like Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which causes this behavior. We can work around it by calling ::SetErrorMode(0) when DRT launches.

This is now bug 55222.
Comment 5 Adam Roben (:aroben) 2011-02-25 09:28:23 PST
(In reply to comment #3)
> > 2) We need to set keys in WOW6432Node
> 
> We can achieve this by passing --wow32 to regtool.

This is now bug 55225.
Comment 6 Adam Roben (:aroben) 2011-02-25 09:49:36 PST
I filed bug 55227 to cover making old-run-webkit-tests not claim to save crash logs when it really can't.
Comment 7 Adam Roben (:aroben) 2011-02-25 11:00:53 PST
(In reply to comment #3)
> (In reply to comment #2)
> > 1) We need administrator privileges to modify the registry
> 
> We can work around this by turning off UAC on the bots. Another option would be to set up the post-mortem debugger registry keys manually, and have them look for a command file in a predetermined location on disk. old-run-webkit-tests could then write the command file to that location, and not try to modify the registry at all.

All problems except this one have now been fixed. Disabling UAC on the bots sounds like the easiest solution, so let's go with that. I've updated the instructions at <http://trac.webkit.org/wiki/BuildingOnWindows#GettingCrashLogs>.
Comment 8 Adam Roben (:aroben) 2011-02-27 09:21:57 PST
I discovered one more issue: bug 55318.