Fix Debug.Assert failures in SpeedScope tests and DynamicTraceEventParser#2368
Merged
Merged
Conversation
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
1 similar comment
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
1 similar comment
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
1 similar comment
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
leculver
approved these changes
Feb 23, 2026
| // cannot handle. | ||
| if (GetProviderName() != null && !m_ConfirmedAllEventsAreInEnumeration && | ||
| !(this is PredefinedDynamicTraceEventParser) && | ||
| !(this is Parsers.ApplicationServerTraceEventParser)) |
Collaborator
There was a problem hiding this comment.
This seems fragile. Fine for now, but if you find you need another class it might be time to think through the design.
Member
Author
There was a problem hiding this comment.
Yep. I agree that if this gets bigger we should look to make this a real pattern.
This was referenced Mar 31, 2026
Merged
This was referenced Apr 7, 2026
This was referenced Apr 15, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The SpeedScope
CanConvertProvidedTraceFilestests were clearingTrace.Listenersto suppressDebug.Assertfailures that fired during trace parsing. This masked two real bugs:Fix 1: Duplicate template enumeration in DynamicTraceEventParser
DynamicTraceEventParser.EnumerateTemplatesenumerates templates from three sources (manifest-based,registeredParser, andeventPipeTraceEventParser) but only deduplicated between manifest-based templates andregisteredParser. When bothregisteredParserandeventPipeTraceEventParserknew about the same event, the template was enumerated twice, causingSubscribeto assert on the duplicate withmayHaveExistedBefore=false.Fix: Filter
eventPipeTraceEventParsertemplates againstregisteredParser, matching the existing dedup pattern for manifest-based templates.Fix 2: Skip ConfirmAllEventsAreInEnumeration for ApplicationServerTraceEventParser
ApplicationServerTraceEventParseris auto-generated and has many events that share the same task name and opcode, producing duplicate computed event names (100+ duplicates). TheConfirmAllEventsAreInEnumerationDEBUG validation cannot handle this pattern.Fix: Skip this parser from the validation, similar to how
PredefinedDynamicTraceEventParseris already excluded.Cleanup
ThrowingTraceListenerandDebugAssertionTestsexplaining that on .NET 5+, theDefaultTraceListeneralready throws on assert failures, so no additional listener configuration is needed.