Skip to content

[Test][UserEvents] Trace file does not contain expected events #123442

@mdh1418

Description

@mdh1418

Description

UserEvents tests introduced in #122430 are flakey and sometimes don't capture the expected .NET events.

The error will ultimately contains Trace file <trace_file> does not contain expected events. with a preceding message specific to the scenario. (e.g. The trace did not contain two WorkStart events with ActivityIds for RequestA and RequestB. for testing ActivityIDs)

The test output looks like

Tracee process started with PID: 29998
Waiting for tracee process to exit...
Stopping record-trace with SIGINT.
Waiting for record-trace to exit...
[record-trace] Recording started.  Press CTRL+C to stop.
[record-trace] Recording stopped.
[record-trace] Resolving symbols.
[record-trace] Finished recording trace.
[record-trace] Trace written to /datadisks/disk1/work/AABC0977/t/tmpDnj9kx.nettrace
Uploading trace file to Helix work item directory: /datadisks/disk1/work/AABC0977/w/AF9D0976/uploads/activity.nettrace
Expected: 100
Actual: 255

Reproduction Steps

https://github.com/dotnet/runtime/tree/main/src/tests/tracing/userevents

Expected behavior

The nettrace contains the expected events

Actual behavior

Missing events

Regression?

No, this feature was introduced in .NET 10 and these are the first functional tests added.

Known Workarounds

No response

Configuration

No response

Other information

No response

Known Issue Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "does not contain expected events",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎
Result validation: ⚠️ Validation could not be done without an Azure DevOps build URL on the issue. Please add it to the "Build: 🔎" line.
Validation performed at: 1/22/2026 11:26:04 AM UTC

Report

Build Definition Test Pull Request
1265473 dotnet/runtime tracing/userevents/multithread/multithread/multithread.cmd #123553
1265408 dotnet/runtime tracing/userevents/multithread/multithread/multithread.cmd #123511
1265342 dotnet/runtime tracing/userevents/activity/activity/activity.cmd #123313
1265337 dotnet/runtime tracing/userevents/managedevent/managedevent/managedevent.cmd #123557
1265144 dotnet/runtime tracing/userevents/multithread/multithread/multithread.cmd #122947
1264859 dotnet/runtime tracing/userevents/activity/activity/activity.cmd #123519
1264855 dotnet/runtime tracing/userevents/multithread/multithread/multithread.cmd #122722
1264295 dotnet/runtime tracing/userevents/managedevent/managedevent/managedevent.cmd #123535
1264234 dotnet/runtime tracing/userevents/custommetadata/custommetadata/custommetadata.cmd
1264139 dotnet/runtime tracing/userevents/basic/basic/basic.cmd #123530
1264063 dotnet/runtime tracing/userevents/custommetadata/custommetadata/custommetadata.cmd #123514
1263877 dotnet/runtime tracing/userevents/custommetadata/custommetadata/custommetadata.cmd #122947
1263866 dotnet/runtime tracing/userevents/managedevent/managedevent/managedevent.cmd
1263729 dotnet/runtime tracing/userevents/custommetadata/custommetadata/custommetadata.cmd #123502
1263471 dotnet/runtime tracing/userevents/activity/activity/activity.cmd
1263349 dotnet/runtime tracing/userevents/multithread/multithread/multithread.cmd #123248
1263330 dotnet/runtime tracing/userevents/multithread/multithread/multithread.cmd #123448
1263338 dotnet/runtime tracing/userevents/multithread/multithread/multithread.cmd #122947
1262673 dotnet/runtime tracing/userevents/activity/activity/activity.cmd #123329
1262662 dotnet/runtime tracing/userevents/basic/basic/basic.cmd #120336
1262576 dotnet/runtime tracing/userevents/activity/activity/activity.cmd
1262530 dotnet/runtime tracing/userevents/managedevent/managedevent/managedevent.cmd #123476
1261197 dotnet/runtime tracing/userevents/basic/basic/basic.cmd #123434
1260358 dotnet/runtime tracing/userevents/activity/activity/activity.cmd #123402

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
10 24 24

Metadata

Metadata

Assignees

No one assigned

    Labels

    Known Build ErrorUse this to report build issues in the .NET Helix tabarea-Tracing-coreclrblocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions