"vcvarsall.bat" freezes on new 1809-based Windows images

For some reason, calling C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat seems to freeze 1809-based Windows builds.

Now on 1809: https://travis-ci.org/hpi-swa/graalsqueak/jobs/646198232#L104
Before on 1803: https://travis-ci.org/hpi-swa/graalsqueak/jobs/645394730#L104

2 Likes
  • Are you sure the files that you try to run actually exist?

    Since it’s essentially a different system, need to rediscover what is available out of the box.

  • To debug a .bat file, you can replace @echo off at the start of it with @echo on.

    • Looking at the vcvarsall.bat on my system, you can also set VSCMD_DEBUG envvar to 3 to the same effect.

I’m afraid this doesn’t really solve the problem.
vcvarsall.bat does exist, and I don’t seem to get any debug output when setting VSCMD_DEBUG=3 (see https://travis-ci.org/hpi-swa/graalsqueak/jobs/646488990#L64)

It looks like other projects are timing out because of this as well. Here’s an example:
https://travis-ci.org/tcltk/tcl/jobs/646432319#L35

Any idea what’s going on here?

1 Like

We’re seeing this exact error on hiredis builds (and all recent PRs).

I first noticed the failure in a PR so I started bisecting to find where it was introduced, but have now seen several previously passing builds fail in the same way.

Link to an example failure

Same issue for me. Builds started to hang without any relevant changes in the project. Example job

Okay, found it.

The behavior change happens when KB4534273 (a recent update for 1809) is installed.

Git Bash starts formatting the single-quoted part as a single argument (as it should) and treating /c as a path (as it usually does) – which it didn’t do before for some reason. So in fact, what you see now is the correct behavior.

As such, cmd /C '"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64 && <etc>' turns into C:\Windows\system32\cmd.exe C:/ "\"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat\" amd64 && <etc>" argument for CreateProcess.

Since Cmd, unlike Bash, expects the code on the command line to not be a single argument but multiple, one for each lexeme, you need to represent it accordingly as multiple arguments, quoting Bash special syntax as necessary (and also prevent treating /c as path):

cmd.exe //C 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' amd64 '&&' <etc>
4 Likes