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

Bug Report: some processes still do not terminate after closing terminal #1603

Closed
andrewbaker-uk opened this issue Jun 25, 2019 · 6 comments
Closed
Assignees
Labels
Area-TerminalConnection Issues pertaining to the terminal<->backend connection interface Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Milestone

Comments

@andrewbaker-uk
Copy link

Environment

Windows build number: 10.0.18362.175
Windows Terminal version (if applicable): 0.2.1715.0

Any other software?

Steps to reproduce

Run ping across multiple powershell tabs and close terminal without stopping ping

Check taskmgr and ping.exe will still be running

Expected behavior

Ping.exe terminates when terminal session ends

Actual behavior

Terminal not killing processes executed after being closed

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 25, 2019
@andrewbaker-uk andrewbaker-uk changed the title Bug Report Bug Report: ping does not terminate after closing terminal Jun 25, 2019
@carlos-zamora carlos-zamora added Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. labels Jun 25, 2019
@Shorotshishir
Copy link

Could recreate it inside terminal and cmd does the same as PowerShell

  • both CMD and Powershell tab hangs up for quite a long time if trying to close the tab without manually terminating the process, sometimes crashes the terminal app.
  • If checked in Task Manager, we see the Ping and Powershell running, though the app has crashed.

@fredless
Copy link

fredless commented Jun 26, 2019

have observed cmd+ping still running as well, though I cannot replicate reliably nor do I recall an associated crash or slow close as @Shorotshishir mentioned.
image
image

..and a packet trace confirms that the process is still sending traffic as you might expect.

EDIT in case it's helpful: just noticed that terminating the subprocess (ping in this case) when in this condition seems to allow cmd.exe to wrap up as well

@DHowett-MSFT
Copy link
Contributor

So, this is weird. We stuff the shell and console host into a job object so they terminate when we do. That's a system feature that should almost certainly not fail.

@DHowett-MSFT DHowett-MSFT added Area-TerminalConnection Issues pertaining to the terminal<->backend connection interface and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 27, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 27, 2019
@DHowett-MSFT DHowett-MSFT changed the title Bug Report: ping does not terminate after closing terminal Bug Report: some processes still do not terminate after closing terminal Jun 27, 2019
@DHowett-MSFT DHowett-MSFT added this to the Terminal v1.0 milestone Jun 27, 2019
@DHowett-MSFT DHowett-MSFT added the Help Wanted We encourage anyone to jump in on these. label Jun 27, 2019
@DHowett-MSFT DHowett-MSFT self-assigned this Jul 25, 2019
@ShadowJonathan
Copy link

I also see this behaviour happen with WSL terminals, in ubuntu i can see multiple instances of init running after i closed their tabs, with their processes running in them.

(i discovered this because apt locked itself up while it waited for a nonexistent user confirmation while i got bounced trying to run an install from another tab, while the apt command already should've terminated a few hours ago when i closed that window)

@zadjii-msft
Copy link
Member

#2185 Is probably related

@DHowett-MSFT
Copy link
Contributor

Let's use #2185 as the master issue for these.

@DHowett-MSFT DHowett-MSFT added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Aug 26, 2019
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalConnection Issues pertaining to the terminal<->backend connection interface Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

8 participants