-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Memory Leak #16217
Comments
Are you using any sort of UIA application - Narrator, Jaws, NVDA, something like that/? (ala #16209) |
@zadjii-msft no "screen readers" are active. I did see that issue, but wasn't sure what software NVDA was - but now that makes sense after you mentioned Narrator/Jaws. |
Hey @Silvenga. Any chance you're willing to share the dump privately over email? TIA |
@carlos-zamora of course! My email is on my GitHub profile (I think anyone logged in can see it). Shoot me an email I can reply to and I'll figure out a place to upload the dump... (likely One Drive) |
Following up via email. |
Also reproduced in v1.18.2822.0. I have another dump if that would help at all (262MB compressed). |
well aren't you a suspicious stack frame in the dump. What we've got here is
|
It's been a while since I've had to find a memory leak in unmanaged code. Last one I debugged was to track down allocations in a CLR profiler. I think we ultimately hooked the native allocations using DotTrace. So with DotTrace, the most impactful stack that allocated memory that wasn't released:
About 1.5MB of unreleased native allocations in this 2 minute trace. I'll try and get a longer trace since I'm assuming this is just being stored in the buffer? |
terminal/src/renderer/uia/UiaRenderer.cpp Lines 171 to 182 in 0289cb0
terminal/src/renderer/uia/UiaRenderer.cpp Lines 224 to 236 in 0289cb0
terminal/src/renderer/uia/UiaRenderer.cpp Lines 253 to 303 in 0289cb0
|
I bet if we're not enabled we just queue up all the text into |
Another top stack (related to UiaEngine::Present as you linked above), about 12MB of allocations when printing enough text to fill the scroll back buffer every few seconds:
|
Moving a comment:
|
I suppose the question now is what to do with the output in this case. We disable the UIA renderer when the control loses focus, so presumably the output can just be lost safely, yea? Like, we shouldn't just scream the entire buffer back at UIA once the control regains focus. Second question would be: Do we filter based on |
Correct. I'd modify
Filter based on |
Windows Terminal version
1.17.11461.0
Windows build number
10.0.19045.0
Other Software
Powershell 5.1.19041.3570
Steps to reproduce
This has occurred a couple times, mostly when I leave docker logs open overnight.
I do have a memory dump - 300MB compressed. I cannot upload the dump publicly though.
Expected Behavior
No response
Actual Behavior
Memory usage continues to climb and Windows starts paging like crazy.
I suspect something is off with the buffer limit (I'm assuming there's a limit somewhere).
The text was updated successfully, but these errors were encountered: