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

WindowsTerminal.exe leak (never exit) after the wtd.exe new-tab ... command line process exits. #16456

Closed
ShenHongFei opened this issue Dec 12, 2023 · 4 comments · Fixed by #16617
Labels
Area-Remoting Communication layer between windows. Often for windowing behavior, quake mode, etc. Area-Windowing Window frame, quake mode, tearout In-PR This issue has a related PR 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.

Comments

@ShenHongFei
Copy link

Windows Terminal version

latest commit of main branch

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce

Execute the following command on the command line:

wtd.exe new-tab ping.exe localhost

Expected Behavior

There is only one WindowsTerminal.exe process after the ping command ends

Actual Behavior

Each time the above command is executed, there will be one more WindowsTerminal.exe process.

I debugged the redundant WindowsTerminal.exe process and found that it was stuck on the line highlighted in the picture below.
D:\1\winterm\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\include\wil\filesystem.h

image

I guessed it might be related to Microsoft.Windows.ImplementationLibrary, and then revert this PR #16120
After recompiling and building, the problem disappeared and there were no redundant leaking processes.

@ShenHongFei ShenHongFei added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Dec 12, 2023
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please 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. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@zadjii-msft
Copy link
Member

Thanks for filing this!

I noticed this a few weeks back and totally forgot to file or investigate it. I'm guessing we're starting up the settings file watcher as we do the handoff to the monarch, but then never closing.

@zadjii-msft zadjii-msft added Product-Terminal The new Windows Terminal. Area-Remoting Communication layer between windows. Often for windowing behavior, quake mode, etc. Area-Windowing Window frame, quake mode, tearout labels Dec 12, 2023
@zadjii-msft zadjii-msft added this to the Terminal v1.20 milestone Dec 12, 2023
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Dec 12, 2023
@DHowett
Copy link
Member

DHowett commented Dec 12, 2023

Oh, @zadjii-msft, this is the one that was caused by microsoft/wil#326.

It may have been fixed in microsoft/wil#386

Which we should ingest!

@DHowett
Copy link
Member

DHowett commented Dec 12, 2023

(it hasn't been shipped to the nuget feed yet)

DHowett added a commit that referenced this issue Jan 29, 2024
This includes a fix for the hang on shutdown due to the folder change
reader.

Closes #16456
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label Jan 29, 2024
DHowett added a commit that referenced this issue Jan 31, 2024
This includes a fix for the hang on shutdown due to the folder change
reader.

WIL now validates format strings in `LOG...` macros (yay!) and so we
needed to fix some of our `LOG` macros.

Closes #16456
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Jan 31, 2024
DHowett added a commit that referenced this issue Feb 21, 2024
This includes a fix for the hang on shutdown due to the folder change
reader.

WIL now validates format strings in `LOG...` macros (yay!) and so we
needed to fix some of our `LOG` macros.

Closes #16456

(cherry picked from commit ce30e7c)
Service-Card-Id: 91892152
Service-Version: 1.20
DHowett added a commit that referenced this issue Feb 26, 2024
This includes a fix for the hang on shutdown due to the folder change
reader.

WIL now validates format strings in `LOG...` macros (yay!) and so we
needed to fix some of our `LOG` macros.

Closes #16456

(cherry picked from commit ce30e7c)
Service-Card-Id: 91923199
Service-Version: 1.19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Remoting Communication layer between windows. Often for windowing behavior, quake mode, etc. Area-Windowing Window frame, quake mode, tearout In-PR This issue has a related PR 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants