{"record":{"id":"cef897c01a15541b","repo":"dotnet/runtime","slug":"eventnode-event-does-not-have-a-symbol","errorCode":null,"errorMessage":"{eventNode} event does not have a symbol","messagePattern":"(.+?) event does not have a symbol","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/coreclr/scripts/genLttngProvider.py","lineNumber":283,"sourceCode":"#define T_TRACEPOINT_INSTANCE(name) \\\\\nTRACEPOINT_EVENT_INSTANCE(\\\\\n\"\"\")\n    lTTngHdr.append(\"    \" + providerName + \",\\\\\\n\")\n    lTTngHdr.append(\"    emptyTemplate,\\\\\\n\")\n\n    lTTngHdr.append(\"\"\"    name ,\\\\\n    TP_ARGS()\\\\\n)\"\"\")\n#end of empty template\n# create the event instance in headers\n    lTTngHdr.append(\"\\n\")\n\n    for eventNode in eventNodes:\n        eventName    = eventNode.getAttribute('symbol');\n        templateName = eventNode.getAttribute('template');\n\n        if not eventName :\n            raise Exception(eventNode + \" event does not have a symbol\")\n        if not templateName:\n            lTTngHdr.append(\"T_TRACEPOINT_INSTANCE(\")\n            lTTngHdr.append(eventName +\")\\n\")\n            continue\n\n        subevent = templateName.replace(templateName,'')\n        lTTngHdr.append(templateName)\n        lTTngHdr.append(\"T_TRACEPOINT_INSTANCE(\")\n        lTTngHdr.append(eventName + subevent + \")\\n\")\n\n    lTTngHdr.append(\"\\n#endif /* LTTNG_CORECLR_H\")\n    lTTngHdr.append(providerName + \" */\\n\")\n    lTTngHdr.append(\"#include <lttng/tracepoint-event.h>\")\n\n    return ''.join(lTTngHdr)\n\n\ndef generateMethodBody(template, providerName, eventName, runtimeFlavor):","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/scripts/genLttngProvider.py#L265-L301","documentation":"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.","triggerScenarios":"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.","commonSituations":"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').","solutions":["Open the manifest file passed via --man and locate the <event> element missing a 'symbol' attribute; add symbol=\"EventName\" to it.","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.","If the error message shows the eventNode object representation, use it to identify the parent provider and approximate location in the manifest."],"exampleFix":"<!-- before -->\n<event value=\"123\" task=\"MyTask\"/>\n\n<!-- after -->\n<event value=\"123\" symbol=\"MyEventName\" task=\"MyTask\"/>","handlingStrategy":"validation","validationCode":"# Validate all event nodes have symbol attributes before calling generateLttngHeader\nfrom xml.dom.minidom import DOM\nmissing_symbols = []\nfor event_node in tree.getElementsByTagName('event'):\n    if not event_node.getAttribute('symbol'):\n        missing_symbols.append(event_node)\nif missing_symbols:\n    raise ValueError(f'{len(missing_symbols)} event nodes are missing symbol attributes')","typeGuard":"def has_symbol_attribute(event_node) -> bool:\n    symbol = event_node.getAttribute('symbol')\n    return bool(symbol and symbol.strip())","tryCatchPattern":"# Build-time generator: let the exception propagate.\n# To debug which event is affected, catch and print parent context:\ntry:\n    generateLttngHeader(providerName, allTemplates, eventNodes, runtimeFlavor)\nexcept Exception as e:\n    for i, node in enumerate(eventNodes):\n        if not node.getAttribute('symbol'):\n            print(f'Event node {i} in provider {node.parentNode.getAttribute(\"name\")} missing symbol')\n    raise","preventionTips":["Always include a 'symbol' attribute on every <event> element in ETW manifest XML files.","Use an XML schema or linting step to validate manifests before running the generator.","Copy existing event definitions from well-formed manifests (e.g., ClrEtwAll.man) as templates."],"tags":["code-generation","lttng","tracing","manifest","xml","validation"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}