dotnet/runtime · error · Exception

{}: Error processing event :{}(ID{}): This file must contain

Error message

{}: Error processing event :{}(ID{}): This file must contain either ALL versions of this event or NO versions of this event. Currently some, but not all, versions of this event are present

What it means

Raised by checkConsistency() in genEtwProvider.py at line 144 when processing events with version numbers. The ETW manifest can have multiple versions of the same event (same value/ID, different versions). The exclusion list's nostack and explicitstack lists control which events collect stack walks. This error fires when a previously-encountered event value had a stack preference specified, but a subsequent version of the same event has NO preference — meaning the developer inconsistently specified stack support across versions.

Source

Thrown at src/coreclr/scripts/genEtwProvider.py:144

            # and some versions are not on either the nostack or stack list,
            # then developer likely forgot to specify one of the versions

            eventStackBitFromNoStackList       = getStackWalkBit(eventProvider, taskName, eventSymbol, exclusionInfo.nostack)
            eventStackBitFromExplicitStackList = getStackWalkBit(eventProvider, taskName, eventSymbol, exclusionInfo.explicitstack)
            sStackSpecificityError = exclusion_filename + ": Error processing event :" + eventSymbol + "(ID" + str(eventValue) + "): This file must contain either ALL versions of this event or NO versions of this event. Currently some, but not all, versions of this event are present\n"

            if not stackSupportSpecified.get(eventValue):
                 # Haven't checked this event before.  Remember whether a preference is stated
                if ( not eventStackBitFromNoStackList) or ( not eventStackBitFromExplicitStackList):
                    stackSupportSpecified[eventValue] = True
                else:
                    stackSupportSpecified[eventValue] = False
            else:
                # We've checked this event before.
                if stackSupportSpecified[eventValue]:
                    # When we last checked, a preference was previously specified, so it better be specified here
                    if eventStackBitFromNoStackList and eventStackBitFromExplicitStackList:
                        raise Exception(sStackSpecificityError)
                else:
                    # When we last checked, a preference was not previously specified, so it better not be specified here
                    if ( not eventStackBitFromNoStackList) or ( not eventStackBitFromExplicitStackList):
                        raise Exception(sStackSpecificityError)

def genEtwMacroHeader(manifest, exclusion_filename, intermediate):
    provider_dirname = os.path.join(intermediate, etw_dirname + "_temp")

    if not os.path.exists(provider_dirname):
        os.makedirs(provider_dirname)

    tree                      = DOM.parse(manifest)
    numOfProviders            = len(tree.getElementsByTagName('provider'))
    nMaxEventBytesPerProvider = 64

    exclusionInfo = parseExclusionList(exclusion_filename)

    with open_for_update(os.path.join(provider_dirname, macroheader_filename)) as header_file:

View on GitHub (pinned to 60108ba66e)

Solutions

  1. Add ALL versions of the event symbol to either the nostack or explicitstack list in the exclusion file, or remove ALL versions from both lists.
  2. Use wildcard patterns (e.g., 'Provider:Task:*') in the exclusion list to cover all versions of the event.
  3. Check the manifest for all event elements sharing the same 'value' attribute and ensure consistent exclusion list coverage.
  4. Review the exclusion list syntax: entries are 'provider:task:symbol' triplets.

Example fix

# before (exclusion list has only one version):
# noclrinstance:
#   Microsoft-Windows-DotNETRuntime:GC:GCHeapStats_V1

# after (add all versions):
# nostack:
#   Microsoft-Windows-DotNETRuntime:GC:GCHeapStats_V1
#   Microsoft-Windows-DotNETRuntime:GC:GCHeapStats_V2
Defensive patterns

Strategy: validation

Validate before calling

def validate_stack_version_consistency(manifest_path: str, exclusion_path: str) -> bool:
    """Check that all versions of each event are consistently in/out of stack lists."""
    import xml.dom.minidom as DOM
    from utilities import parseExclusionList

    tree = DOM.parse(manifest_path)
    exclusion_info = parseExclusionList(exclusion_path)

    for provider_node in tree.getElementsByTagName('provider'):
        event_provider = provider_node.getAttribute('name')
        stack_specified = {}
        for event_node in provider_node.getElementsByTagName('event'):
            task = event_node.getAttribute('task')
            symbol = event_node.getAttribute('symbol')
            value = int(event_node.getAttribute('value'))

            in_nostack = _check_list(event_provider, task, symbol, exclusion_info.nostack)
            in_explicitstack = _check_list(event_provider, task, symbol, exclusion_info.explicitstack)
            has_pref = (not in_nostack) or (not in_explicitstack)

            if value in stack_specified:
                if stack_specified[value] != has_pref:
                    print(f"Inconsistent stack preference for event ID {value} ({symbol})")
                    return False
            else:
                stack_specified[value] = has_pref
    return True

def _check_list(provider, task, symbol, stack_list):
    for entry in stack_list:
        tokens = entry.split(':')
        if (tokens[0] in (provider, '*') and tokens[1] in (task, '*') and tokens[2] in (symbol, '*')):
            return False  # found = getStackWalkBit returns False
    return True

Type guard

null

Try / catch

try:
    checkConsistency(manifest, exclusion_filename)
except Exception as e:
    if 'ALL versions' in str(e):
        print(f"Stack version inconsistency: {e}")
        print("Fix: ensure ALL versions of the event are in nostack/explicitstack, or NONE are.")
    raise

Prevention

When it happens

Trigger: Triggered when: the code has already processed one version of an event (by its numeric 'value') and recorded stackSupportSpecified[eventValue]=True (meaning a preference was found in nostack or explicitstack), then encounters another version of the same event value where BOTH eventStackBitFromNoStackList and eventStackBitFromExplicitStackList are True (meaning getStackWalkBit returned True for both, i.e., the event is NOT found in either list). The inconsistency between versions triggers the error.

Common situations: A developer adds a new version of an event to the manifest but forgets to add the new version's symbol to the nostack or explicitstack exclusion list. The exclusion list uses wildcards that match one version but not another. The event versioning scheme changed and the exclusion list wasn't updated.

Related errors


AI-assisted analysis of dotnet/runtime@60108ba66e (2026-08-10). Data as JSON: /api/errors/9d43477347886696. Report an issue: GitHub.