You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code in GenerateFunctions starts a new process and redirects both stdout and stderr, but it does so synchronously (ReadToEnd). This can lead to dead-locks if the child process produces lot of output. Since the code reads from stdout first, if the child produces lot of output in stderr eventually it will fill the buffers and effectively deadlock (parent is waiting on stdout to close, child is waiting on stderr to be read from).
This is described in the remarks section for the StandardOutput.
To correctly redirect both stdout and stderr they have to be read asynchronously and in parallel.
Note that this can be easily triggered by setting COREHOST_TRACE=1 before running the build. This setting turns on detailed logging in the dotnet host which writes it to stderr.
The text was updated successfully, but these errors were encountered:
The code in
GenerateFunctions
starts a new process and redirects both stdout and stderr, but it does so synchronously (ReadToEnd). This can lead to dead-locks if the child process produces lot of output. Since the code reads from stdout first, if the child produces lot of output in stderr eventually it will fill the buffers and effectively deadlock (parent is waiting on stdout to close, child is waiting on stderr to be read from).This is described in the remarks section for the
StandardOutput
.To correctly redirect both stdout and stderr they have to be read asynchronously and in parallel.
Note that this can be easily triggered by setting
COREHOST_TRACE=1
before running the build. This setting turns on detailed logging in the dotnet host which writes it to stderr.The text was updated successfully, but these errors were encountered: