Skip to content
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

Remove Runaway Process Killer #440

Merged
merged 1 commit into from
Aug 3, 2020
Merged

Remove Runaway Process Killer #440

merged 1 commit into from
Aug 3, 2020

Conversation

nxtn
Copy link
Contributor

@nxtn nxtn commented Mar 15, 2020

Shifts the responsibility onto the operating system.

This feature is now safely enabled by default.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish I could say this is fine, but I do not have enough expertise to confirm that easily. IMHO it needs more discussion before merging. Some notes:

  • It is not really a deprecation, it is a removal. Some options like stopTimeout and parent termination have no replacement in the new implementation.
  • The CREATE_BREAKAWAY_FROM_JOB flag is supported in Windows versions we implicitly target. https://docs.microsoft.com/en-us/windows/win32/procthread/process-creation-flags
  • The change will enable the process termination behavior by default. So it will alter the behavior for those who have not enabled Runaway Process Killer. I do not mind doing that, but maybe we should offer an escape hatch parameter which disables process termination

My preference would be to keep it for 3.0. We could also introduce a new opt-in native system process termination support without removing the RunawayProcessKiller first

@@ -10,6 +10,6 @@ This hidden command is a flavor of the `restart` operation,
where winsw creates another winsw process in a separate process group,
and restarts the service from there.

This additional indirection is necessary because Windows Service Control Manager (SCM) will kill child processes recursively when it stops a service.
SCM doesn't provide the restart operation as an atomic operation either, so winsw implements restart by a sequence of stop and start.
This additional indirection is necessary because winsw will kill child processes recursively when stopping.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This additional indirection is necessary because winsw will kill child processes recursively when stopping.
This additional indirection is necessary because WinSW will kill child processes recursively when stopping.

src/Test/winswTests/Extensions/RunawayProcessKillerTest.cs Outdated Show resolved Hide resolved
@nxtn nxtn modified the milestones: 2.Next, 3.Next Apr 8, 2020
@nxtn nxtn marked this pull request as draft April 11, 2020 13:21
@nxtn nxtn changed the title Deprecate Runaway Process Killer Remove Runaway Process Killer Apr 12, 2020
@nxtn
Copy link
Contributor Author

nxtn commented Aug 2, 2020

I suggest moving forward. With a few bug fixes and stability updates WinSW rarely crashes or leaves child processes aside. This will work when a serious crash (CSE/AVE/SOE) or process kill (by a user or SCM) occurs. If the service stops normally (under control) we can turn it off.

  • The CREATE_BREAKAWAY_FROM_JOB flag is supported since Windows XP.

@oleg-nenashev
Copy link
Member

oleg-nenashev commented Aug 2, 2020 via email

@nxtn nxtn changed the base branch from master to v3 August 3, 2020 01:28
@nxtn nxtn marked this pull request as ready for review August 3, 2020 02:25
@nxtn nxtn added the removed label Aug 3, 2020
@nxtn nxtn linked an issue Aug 3, 2020 that may be closed by this pull request
@nxtn nxtn merged commit d90151b into winsw:v3 Aug 3, 2020
@nxtn nxtn deleted the runaway branch August 3, 2020 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RunawayProcessKiller
2 participants