dotnet/runtime · error · Exception

{eventNode} event does not have a symbol

Error message

{eventNode} event does not have a symbol

What it means

Thrown by generateLttngHeader() when iterating over <event> XML nodes from the ETW manifest and encountering one whose 'symbol' attribute is missing or empty. Every event in a .NET runtime ETW manifest must have a symbol name that becomes the C tracepoint function name; without it, the generator cannot emit a valid TRACEPOINT_EVENT_INSTANCE macro invocation.

Source

Thrown at src/coreclr/scripts/genLttngProvider.py:283

#define T_TRACEPOINT_INSTANCE(name) \\
TRACEPOINT_EVENT_INSTANCE(\\
""")
    lTTngHdr.append("    " + providerName + ",\\\n")
    lTTngHdr.append("    emptyTemplate,\\\n")

    lTTngHdr.append("""    name ,\\
    TP_ARGS()\\
)""")
#end of empty template
# create the event instance in headers
    lTTngHdr.append("\n")

    for eventNode in eventNodes:
        eventName    = eventNode.getAttribute('symbol');
        templateName = eventNode.getAttribute('template');

        if not eventName :
            raise Exception(eventNode + " event does not have a symbol")
        if not templateName:
            lTTngHdr.append("T_TRACEPOINT_INSTANCE(")
            lTTngHdr.append(eventName +")\n")
            continue

        subevent = templateName.replace(templateName,'')
        lTTngHdr.append(templateName)
        lTTngHdr.append("T_TRACEPOINT_INSTANCE(")
        lTTngHdr.append(eventName + subevent + ")\n")

    lTTngHdr.append("\n#endif /* LTTNG_CORECLR_H")
    lTTngHdr.append(providerName + " */\n")
    lTTngHdr.append("#include <lttng/tracepoint-event.h>")

    return ''.join(lTTngHdr)


def generateMethodBody(template, providerName, eventName, runtimeFlavor):

View on GitHub (pinned to 290d5ab72c)

Solutions

  1. Open the manifest file passed via --man and locate the <event> element missing a 'symbol' attribute; add symbol="EventName" to it.
  2. Validate the manifest XML against the existing well-formed manifests in the repo (e.g., src/coreclr/vm/ClrEtwAll.man) to ensure all <event> elements have symbol attributes.
  3. If the error message shows the eventNode object representation, use it to identify the parent provider and approximate location in the manifest.

Example fix

<!-- before -->
<event value="123" task="MyTask"/>

<!-- after -->
<event value="123" symbol="MyEventName" task="MyTask"/>
Defensive patterns

Strategy: validation

Validate before calling

# Validate all event nodes have symbol attributes before calling generateLttngHeader
from xml.dom.minidom import DOM
missing_symbols = []
for event_node in tree.getElementsByTagName('event'):
    if not event_node.getAttribute('symbol'):
        missing_symbols.append(event_node)
if missing_symbols:
    raise ValueError(f'{len(missing_symbols)} event nodes are missing symbol attributes')

Type guard

def has_symbol_attribute(event_node) -> bool:
    symbol = event_node.getAttribute('symbol')
    return bool(symbol and symbol.strip())

Try / catch

# Build-time generator: let the exception propagate.
# To debug which event is affected, catch and print parent context:
try:
    generateLttngHeader(providerName, allTemplates, eventNodes, runtimeFlavor)
except Exception as e:
    for i, node in enumerate(eventNodes):
        if not node.getAttribute('symbol'):
            print(f'Event node {i} in provider {node.parentNode.getAttribute("name")} missing symbol')
    raise

Prevention

When it happens

Trigger: generateLttngHeader() is called with eventNodes from DOM.parse(etwmanifest).getElementsByTagName('event'). For each eventNode, eventName = eventNode.getAttribute('symbol'). If eventName is falsy (attribute absent or empty string), the exception is raised at line 283.

Common situations: A developer hand-edits or programmatically generates an ETW manifest XML and forgets to include the 'symbol' attribute on an <event> element. This can also happen if a manifest is copied from a template and the symbol attribute is accidentally deleted or misspelled (e.g., 'Symbol' with uppercase S instead of 'symbol').

Related errors


AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06). Data as JSON: /api/errors/cef897c01a15541b. Report an issue: GitHub.