Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip flaky test (EventPipeSession_ReceivesExpectedCLREvents) #3949

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

jamescrosswell
Copy link
Collaborator

#skip-changelog

EventPipeSession_ReceivesExpectedCLREvents is flaky in CI.

Example error:

Error: Assert.Contains() Failure: Item not found in set
Set:       [".ctor", "set_Target", "AwaitUnsafeOnCompleted", "GetStateMachineBox", "get_Context", ···]
Not found: "MethodToBeLoaded"

  Failed Sentry.Profiling.Tests.SamplingTransactionProfilerTests.EventPipeSession_ReceivesExpectedCLREvents [1 s]
  Error Message:
   Assert.Contains() Failure: Item not found in set
Set:       [".ctor", "set_Target", "AwaitUnsafeOnCompleted", "GetStateMachineBox", "get_Context", ···]
Not found: "MethodToBeLoaded"
  Stack Trace:
     at Sentry.Profiling.Tests.SamplingTransactionProfilerTests.EventPipeSession_ReceivesExpectedCLREvents() in /Users/runner/work/sentry-dotnet/sentry-dotnet/test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs:line 209
--- End of stack trace from previous location ---
  Standard Output Messages:
 [Debug 00:00:00.93]: Sleeping... time remaining: 250 ms
 [Debug 00:00:01.03]: Sleeping... time remaining: 152 ms
 [Debug 00:00:01.03]: Profiling is being cut-of after 50 ms because the transaction takes longer than that.
 [Debug 00:00:01.15]: Sleeping... time remaining: 27 ms
 [Debug 00:00:01.17]: Profiler has been stopped and has received all the samples up to the end time.
 [Debug 00:00:01.18]: Sleeping... time remaining: 250 ms
 [Debug 00:00:01.28]: Sleeping... time remaining: 151 ms
 [Debug 00:00:01.43]: Sleeping... time remaining: 4 ms
 [Warning 00:00:01.62]: Error during sampler profiler session shutdown.
     Exception: System.AggregateException: One or more errors occurred. (A task was canceled.)
  ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
    at System.Threading.Tasks.Task.GetExceptions(Boolean includeTaskCanceledExceptions)
    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
    at System.Threading.Tasks.Task.Wait()
    at Sentry.Profiling.SampleProfilerSession.Stop() in /_/src/Sentry.Profiling/SampleProfilerSession.cs:line 135
    at Sentry.Profiling.SampleProfilerSession.Dispose() in /_/src/Sentry.Profiling/SampleProfilerSession.cs:line 146
    at Sentry.Profiling.Tests.SamplingTransactionProfilerTests.EventPipeSession_ReceivesExpectedCLREvents() in /Users/runner/work/sentry-dotnet/sentry-dotnet/test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs:line 209
    at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
    at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
    at Xunit.Sdk.AsyncTestSyncContext.<>c__DisplayClass7_0.<Post>b__0() in /_/src/xunit.execution/Sdk/AsyncTestSyncContext.cs:line 58
    at Xunit.Sdk.XunitWorkerThread.<>c.<QueueUserWorkItem>b__5_0(Object _) in /_/src/common/XunitWorkerThread.cs:line 37
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
    at System.Threading.Thread.StartCallback()
 --- End of stack trace from previous location ---
 
    --- End of inner exception stack trace ---
    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
    at System.Threading.Tasks.Task.Wait()
    at Sentry.Profiling.SampleProfilerSession.Stop() in /_/src/Sentry.Profiling/SampleProfilerSession.cs:line 135

@jamescrosswell jamescrosswell merged commit 50e5232 into main Feb 10, 2025
22 checks passed
@jamescrosswell jamescrosswell deleted the flaky-event-pipe-session branch February 10, 2025 10:22
vaind added a commit that referenced this pull request Feb 12, 2025
@vaind vaind mentioned this pull request Feb 12, 2025
jamescrosswell added a commit that referenced this pull request Feb 13, 2025
* Revert "Skip flaky test (EventPipeSession_ReceivesExpectedCLREvents) (#3949)"

This reverts commit 50e5232.

* Revert "fix: net8 unknown stack trace methods for JIT methods (#3942)"

This reverts commit d197cb2.

* Revert "chore: profiling improvements (#3941)"

This reverts commit bea672a.

* chore: revert changelog

* Verify tests

* Windows verify tests

---------

Co-authored-by: James Crosswell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants