-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix VT parser memory leak in tracing #8618
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… on all actions (since it is buffering up all characters for trace reasons.) Also don't bother storing if no one is listening.
miniksa
added
Product-Conhost
For issues in the Console codebase
Area-Performance
Performance-related issue
Product-Conpty
For console issues specifically related to conpty
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Product-Terminal
The new Windows Terminal.
labels
Dec 19, 2020
6 tasks
carlos-zamora
approved these changes
Dec 24, 2020
DHowett
approved these changes
Dec 24, 2020
zadjii-msft
approved these changes
Jan 4, 2021
miniksa
added
the
AutoMerge
Marked for automatic merge by the bot when requirements are met
label
Jan 4, 2021
Hello @miniksa! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
ghost
deleted the
dev/miniksa/trace_memory_leak
branch
January 4, 2021 17:14
🎉 Handy links: |
ghost
mentioned this pull request
Jan 28, 2021
mpela81
pushed a commit
to mpela81/terminal
that referenced
this pull request
Jan 28, 2021
Fix memory leak that occurs from not dispatching the end of sequences on all actions (since it is buffering up all characters for trace reasons.) Also don't bother storing if no one is listening. ## PR Checklist - [x] Closes microsoft#8283 * [x] Fixes leak found while bumbling around. * [x] I work here. ## Detailed Description of the Pull Request / Additional comments - We trace all the things leading up to the Action phase in the VT parser for ETW tracing to make debugging the parser easier, but we made two mistakes. - At some point, three of the actions (related to print/execute) weren't dispatching the stored up sequence to tracing and not clearing it. So printing/executing in a giant run over and over caused the vector to bloat and bloat and bloat forever. - We're storing things even when no one is listening. That's a waste. ## Validation Steps Performed - Watched it grow every time I did `type big.txt` under `taskman.exe`. Then watched it not do that after. - I did technically WPR it to figure out this was the culprit.
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-Performance
Performance-related issue
AutoMerge
Marked for automatic merge by the bot when requirements are met
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-2
A description (P2)
Product-Conhost
For issues in the Console codebase
Product-Conpty
For console issues specifically related to conpty
Product-Terminal
The new Windows Terminal.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix memory leak that occurs from not dispatching the end of sequences on all actions (since it is buffering up all characters for trace reasons.) Also don't bother storing if no one is listening.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
type big.txt
undertaskman.exe
. Then watched it not do that after.