In a typical CI system like Jenkins only the console output and expected build logs are easily available. By the time the result is examined the VM may have even been recycled. So when a build fails this way:
error MSB4166: Child node "4" exited prematurely. Shutting down. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt.
There is no easy way to diagnose the problem, so it cannot be fixed. Note that it's likely this isn't a bug in MSBuild proper - it can happen when a task runs out of stack space.
Suggestion: there is no reason why MSBuild.exe can't read the content of such a file and dump it to the console before it terminates. It knows the child process's PID and when the build started (or, it could give the child process a unique ID to put in the file name, but it's not necessary to do that work). It doesn't need to be a pretty solution.
Hopefully in this situation everything has been drained from the child node's logging events as well, such as the last step it wsa executing.
This situation has been happening in the dotnet/corefx repo.
In a typical CI system like Jenkins only the console output and expected build logs are easily available. By the time the result is examined the VM may have even been recycled. So when a build fails this way:
error MSB4166: Child node "4" exited prematurely. Shutting down. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt.There is no easy way to diagnose the problem, so it cannot be fixed. Note that it's likely this isn't a bug in MSBuild proper - it can happen when a task runs out of stack space.
Suggestion: there is no reason why MSBuild.exe can't read the content of such a file and dump it to the console before it terminates. It knows the child process's PID and when the build started (or, it could give the child process a unique ID to put in the file name, but it's not necessary to do that work). It doesn't need to be a pretty solution.
Hopefully in this situation everything has been drained from the child node's logging events as well, such as the last step it wsa executing.
This situation has been happening in the dotnet/corefx repo.