New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
writing to stdout from a stopexecutable will eventually cause the process to hang #218
Comments
This one sounds like a plan |
[Issue #218] StdOut was not being redirected properly and was causing…
The change also impacts the start (common) executable. According to the brief testing it is not correct in that case because the logs are being drained correctly there to logfiles. I will revisit the implementation, hopefully within 1-2 days |
…ld redirect STDOUT/STDERR when LogHandler is defined It restores logging of executables, which has been broken in winsw#220. Not a regression, because the change has not been released yet
…he main executable logic
Issue #218 - ProcessHelper#StartProcessAndCallbackForExit() should redirect STDOUT/STDERR when LogHandler is defined
The fix has been released in 2.1.1 |
Fixes [JENKINS-46282](https://issues.jenkins-ci.org/browse/JENKINS-46282), which impacts the default installation. Also updates Parent POM in the module Full list of fixes: - JENKINS-46282 - Runaway Process Killer extension was not using the stopTimeoutMs parameter - [WinSW Issue #206](winsw/winsw#206) - Prevent printing of log entries in the `status` command - [WinSW Issue #218](winsw/winsw#218) - Prevent hanging of the stop executable when its logs are not being drained do the parent process Full Diff: winsw/winsw@winsw-v2.1.0...winsw-v2.1.2
Fixes [JENKINS-46282](https://issues.jenkins-ci.org/browse/JENKINS-46282), which impacts the default installation. Also updates Parent POM in the module Full list of fixes: - JENKINS-46282 - Runaway Process Killer extension was not using the stopTimeoutMs parameter - [WinSW Issue jenkinsci#206](winsw/winsw#206) - Prevent printing of log entries in the `status` command - [WinSW Issue jenkinsci#218](winsw/winsw#218) - Prevent hanging of the stop executable when its logs are not being drained do the parent process Full Diff: winsw/winsw@winsw-v2.1.0...winsw-v2.1.2
* [JENKINS-46282] - Update WinSW from 2.1.0 to 2.1.2 Fixes [JENKINS-46282](https://issues.jenkins-ci.org/browse/JENKINS-46282), which impacts the default installation. Also updates Parent POM in the module Full list of fixes: - JENKINS-46282 - Runaway Process Killer extension was not using the stopTimeoutMs parameter - [WinSW Issue #206](winsw/winsw#206) - Prevent printing of log entries in the `status` command - [WinSW Issue #218](winsw/winsw#218) - Prevent hanging of the stop executable when its logs are not being drained do the parent process Full Diff: winsw/winsw@winsw-v2.1.0...winsw-v2.1.2 * [JENKINS-46282] - Pick the released version of Windows Agent Installer
* [JENKINS-46282] - Update WinSW from 2.1.0 to 2.1.2 Fixes [JENKINS-46282](https://issues.jenkins-ci.org/browse/JENKINS-46282), which impacts the default installation. Also updates Parent POM in the module Full list of fixes: - JENKINS-46282 - Runaway Process Killer extension was not using the stopTimeoutMs parameter - [WinSW Issue jenkinsci#206](winsw/winsw#206) - Prevent printing of log entries in the `status` command - [WinSW Issue jenkinsci#218](winsw/winsw#218) - Prevent hanging of the stop executable when its logs are not being drained do the parent process Full Diff: winsw/winsw@winsw-v2.1.0...winsw-v2.1.2 * [JENKINS-46282] - Pick the released version of Windows Agent Installer
* [JENKINS-46282] - Update WinSW from 2.1.0 to 2.1.2 Fixes [JENKINS-46282](https://issues.jenkins-ci.org/browse/JENKINS-46282), which impacts the default installation. Also updates Parent POM in the module Full list of fixes: - JENKINS-46282 - Runaway Process Killer extension was not using the stopTimeoutMs parameter - [WinSW Issue #206](winsw/winsw#206) - Prevent printing of log entries in the `status` command - [WinSW Issue #218](winsw/winsw#218) - Prevent hanging of the stop executable when its logs are not being drained do the parent process Full Diff: winsw/winsw@winsw-v2.1.0...winsw-v2.1.2 * [JENKINS-46282] - Pick the released version of Windows Agent Installer (cherry picked from commit 100202c)
This happens because the stop executable's stdout stream is redirected to the parent process but is never drained, thus eventually causing the stopexecutable's stdout writer to hang.
I recommend either setting these flags to false here:
https://github.com/kohsuke/winsw/blob/0da384180419ae5557685736e1e0e5fdab17eeff/src/Core/WinSWCore/Util/ProcessHelper.cs#L141
Or actually consuming the processes stream and piping it to a log file.
For more info on how to redirect stdout from a process, see here:
https://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo.redirectstandardoutput(v=vs.110).aspx
The text was updated successfully, but these errors were encountered: