I'm experiencing hangs whenever `arc lint` spawns a subprocess that outputs a lot of data to stderr, but not stdin.out. Cpplint is one such example. Doing a bit of digging, it appears I'm seeing a deadlock where the subprocess is blocked trying to write to stderr, Cpplinand arcanist is onblocked waiting for data on the such examplebprocess' stdout.
Doing a bit of digging, it appears I'm seeing a deadlock where the subprocess is blocked trying to write to stderr, and arcanist is blocked waiting for data on the subprocess' stdout. The code responsible for spawning the subprocess and reading its stdout/stderr lives in https://secure.phabricator.com/diffusion/PHU/browse/master/src/future/exec/ExecFuture.php. On Linux, it performs non-blocking reads of the subprocess' stdout/stderr streams, but on Windows it uses blocking reads, apparently because PHP can't do non-blocking reads from a pipe on Windows, nor can it determine whether a call to read() on the pipe will block or not. not (`stream_select()` doesn't work on pipes on Windows.)
There seems to be some code that uses temporary files for stderr and stdout, (`$useWindowsFileStreams`) but this is never executed -- a cursory grep of the Phabricator codebase shows that nobody is calling `setUseWindowsFileStreams()`. Patching ExecFuture so that `$useWindowsFileStreams` is true fixes the issue.
Arcanist and libphutil are the stable branches as of 2016 Week 21.
Using cmd.exe terminal.