Bug 127002 - [Win] Set MSBUILD environment variable to avoid long-lived processes locking log files
Summary: [Win] Set MSBUILD environment variable to avoid long-lived processes locking ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-14 13:15 PST by Brent Fulgham
Modified: 2014-01-14 14:29 PST (History)
2 users (show)

See Also:


Attachments
Patch (2.09 KB, patch)
2014-01-14 13:20 PST, Brent Fulgham
ddkilzer: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>