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

[windows] Spawned processes leak on Windows 10 #815

Closed
kittaakos opened this issue Nov 10, 2017 · 17 comments
Closed

[windows] Spawned processes leak on Windows 10 #815

kittaakos opened this issue Nov 10, 2017 · 17 comments
Labels
OS/Windows issues related to the Windows OS

Comments

@kittaakos
Copy link
Contributor

Start a bundled electron application, kill the application, one can still see stale processes on Windows.

See: theia-ide/yangster-electron#8
Also: microsoft/vscode#26807

@kittaakos kittaakos self-assigned this Nov 10, 2017
kittaakos added a commit that referenced this issue Nov 10, 2017
The new version is intentionally 0.7.1 to be sync with VSCode.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
@hexa00
Copy link

hexa00 commented Nov 10, 2017

Is the node/electron process gone however ?

Makes me think of the backend not stopping on windows after ctrl-c

@kittaakos
Copy link
Contributor Author

Neither 0.7.1 nor 0.7.2 fixes the problem in the bundled electron application.

@kittaakos
Copy link
Contributor Author

gh-815

@kittaakos
Copy link
Contributor Author

PR: #816.

@kittaakos
Copy link
Contributor Author

I try with ps-tree.

@hexa00
Copy link

hexa00 commented Nov 10, 2017

But we're not using node-pty to create a LSP process ?

How is this related?

@kittaakos
Copy link
Contributor Author

I could ask the same, why do you want me to update node-pty if that does not fix my issue?

@hexa00
Copy link

hexa00 commented Nov 10, 2017

@kittaakos I do not ? I said that because of #816

I think like I said in #816 you should use RawProcess that may fix it...

@kittaakos
Copy link
Contributor Author

Let's give it a try. Thanks for #817.

kittaakos added a commit that referenced this issue Nov 15, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 15, 2017
Replaced `child_process` with `RawProcess` in LS contribution.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 15, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 15, 2017
Replaced `child_process` with `RawProcess` in LS contribution.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 16, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 17, 2017
[skip ci]

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 17, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 17, 2017
Replaced `child_process` with `RawProcess` in LS contribution.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 17, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 20, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 20, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 20, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 20, 2017
Replaced `child_process` with `RawProcess` in LS contribution.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 20, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 20, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Instead of terminating all the LS contribution processes, we shut down all processes spawned from the process manager.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
On both `exit` and `error`.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Also changed the info log level to debug in the process manager.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
@kittaakos kittaakos added the OS/Windows issues related to the Windows OS label Nov 27, 2017
kittaakos added a commit that referenced this issue Nov 27, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Replaced `child_process` with `RawProcess` in LS contribution.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Instead of terminating all the LS contribution processes, we shut down all processes spawned from the process manager.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
On both `exit` and `error`.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
kittaakos added a commit that referenced this issue Nov 27, 2017
Also changed the info log level to debug in the process manager.

Signed-off-by: Akos Kitta <kittaakos@gmail.com>
@kittaakos kittaakos reopened this Dec 4, 2017
@kittaakos
Copy link
Contributor Author

The problem still happens on Windows with a bundled application.

@akosyakov
Copy link
Member

Which process? YANG LS?

@kittaakos
Copy link
Contributor Author

Yes, the LS process.

@hexa00
Copy link

hexa00 commented Dec 12, 2017

I think this is this issue: microsoft/node-pty#7

Note it doesn't happen if you use node directly it only happens when you use yarn start.

Maybe we could work around with a script to start it for now with node ?

@Tyriar
Copy link

Tyriar commented Dec 14, 2017

microsoft/node-pty#7 is about pressing ctrl+c either not closing an application or corrupting the viewport in some way.

It's not totally clear to me what the problem is, but if it's about processes leaking under node-pty like microsoft/vscode#26807, then #816 should have fixed this issue.

See the release notes for 0.7.1:

All console processes running inside the pty should now be killed when killing the pty. This issue was observed frequently when running web servers via node-pty #122 via @the-ress, @Tyriar

@hexa00
Copy link

hexa00 commented Dec 14, 2017

ok I have the same issue as described in microsoft/node-pty#7 (comment)

But I'm not running inside node-pty it's directly git bash.

Maybe git bash needs a simliar fix as: rprichard/winpty#130 from winpty

@Tyriar
Copy link

Tyriar commented Dec 15, 2017

Yeah that may be the case then

@kittaakos kittaakos removed their assignment May 29, 2018
@kittaakos
Copy link
Contributor Author

I do not see this anymore. I have verified it on my Windows 10 image with various Xtext based language servers.

I can confirm, the LS (java) process termination was successful. However, the process termination is not instantaneous on Windows. It is because the child processes do not die automatically on Windows when the parent process stops. We have to poll from the LS.

I am closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS/Windows issues related to the Windows OS
Projects
None yet
Development

No branches or pull requests

4 participants