Bug 127002

Summary: [Win] Set MSBUILD environment variable to avoid long-lived processes locking log files
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: Tools / TestsAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dbates
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Patch ddkilzer: review+

Description Brent Fulgham 2014-01-14 13:15:09 PST
We have encountered a number of cases where long running MSBUILD processes can hold onto log files, preventing later build requests from completing.

According to:
http://stackoverflow.com/questions/3919892/msbuild-exe-staying-open-locking-files
and:
http://stackoverflow.com/questions/13510465/the-mystery-of-stuck-inactive-msbuild-exe-processes-locked-stylecop-dll-nuget

... you can control MSBUILD's launch behavior by passing a flag at startup, or setting an environment variable.

Since our build infrastructure does not launch MSBUILD directly, we should just set the environment variable:

MSBUILDDISABLENODEREUSE=1

This tells MSBUILD to terminate after the build has completed, avoiding the locked log file.
Comment 2 Brent Fulgham 2014-01-14 13:20:25 PST
Created attachment 221194 [details]
Patch
Comment 3 David Kilzer (:ddkilzer) 2014-01-14 13:58:54 PST
Comment on attachment 221194 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=221194&action=review

r=me

> Tools/Scripts/webkitdirs.pm:1461
> +        if (!$ENV{'MSBUILDDISABLENODEREUSE'}) {

If it's not set, this may produce a benign (but annoying) error message about using an undefined value.  This check may be slightly better:

        if (!defined $ENV{'MSBUILDDISABLENODEREUSE'} || !$ENV{'MSBUILDDISABLENODEREUSE'}) {
Comment 4 Brent Fulgham 2014-01-14 14:29:47 PST
Committed r162010: <http://trac.webkit.org/changeset/162010>