-
Notifications
You must be signed in to change notification settings - Fork 846
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
Spawned wsl.exe processes by a windows native nodejs child_process spawn command are not dying #12159
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Closed similar issues:
|
I have attached the logs as instructed with the issue reproduced. |
The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running. Diagnostic information
|
The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running. View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Closed similar issues:
Diagnostic information
|
Diagnostic information
|
Diagnostic information
|
Windows Version
Microsoft Windows [Version 10.0.22631.4317]
WSL Version
2.1.5.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.146.1-microsoft-standard-WSL2
Distro Version
Ubuntu 24.04
Other Software
I am using a custom application, developed by myself - https://container-desktop.com
Because on Windows, I cannot use WSL 2 unix domain sockets directly, I need to relay them somehow.
My choice is to use
socat
binary in Ubuntu and use stdin and stdout to relay from a unix socket,/var/run/docker.sock
I created a nodejs server that listens to a named pipe and spawns socat processes inside WSL to write to the socket and read back from it.
My invocation arguments for spawning the WSL socat binary look like this:
After several calls, I see a lot of these accumulating
And behind each are various like these
In linux,
ps aux
shows thatsocat
is dead, but a lot of these accumulatedRepro Steps
clientSocketProcess.kill()
in nodejsYou will notice, socat is killed in WSL, but the weird wsl wrappers are still there and keep accumulating.
Expected Behavior
I expect the related processes to die once the linux socat has exited.
Actual Behavior
Too many init processes running in WSL distro and also too many
wslhost.exe
andconhost.exe
pairsDiagnostic Logs
WslLogs-2024-10-12_21-18-45.zip
The text was updated successfully, but these errors were encountered: