Skip to content

[NativeAOT] Investigate the reflection invoke test failure in DiagnosticSource #72801

@LakshanF

Description

@LakshanF

The test, NoExceptionThrownWhenProcessingStaticActivityProperties, is failing with a reflection invoke call stack via Xunit that is taking time to investigate. Filing this so as to disable just the test scenario and get coverage for the other scenarios.

The XUnit call stack is as below (also copying a simple reflection invoke repro that requires more work since it currently passes)

XUnit callstack from the failure

[0x0]   System_Diagnostics_DiagnosticSource_Tests!System_Diagnostics_DiagnosticSource_Tests_System_Diagnostics_Tests_DiagnosticSourceEventSourceBridgeTests__NoExceptionThrownWhenProcessingStaticActivityProperties   
[0x1]   System_Diagnostics_DiagnosticSource_Tests!Internal_CompilerGenerated__Module___InvokeRetV + 0x28   
[0x2]   System_Diagnostics_DiagnosticSource_Tests!S_P_CoreLib_System_InvokeUtils__CallDynamicInvokeMethod + 0x158   
[0x3]   System_Diagnostics_DiagnosticSource_Tests!S_P_Reflection_Execution_Internal_Reflection_Execution_MethodInvokers_InstanceMethodInvoker__Invoke + 0x65   
[0x4]   System_Diagnostics_DiagnosticSource_Tests!S_P_CoreLib_Internal_Reflection_Core_Execution_MethodInvoker__Invoke + 0x45   
[0x5]   System_Diagnostics_DiagnosticSource_Tests!S_P_CoreLib_System_Reflection_Runtime_MethodInfos_RuntimeMethodInfo__Invoke + 0x58   
[0x6]   System_Diagnostics_DiagnosticSource_Tests!xunit_execution_dotnet_Xunit_Sdk_TestInvoker_1<System___Canon>__CallTestMethod + 0x2a   
[0x7]   System_Diagnostics_DiagnosticSource_Tests!xunit_execution_dotnet_Xunit_Sdk_TestInvoker_1___c__DisplayClass48_0___InvokeTestMethodAsync_b__1_d<System___Canon>__MoveNext + 0x1be   
[0x8]   System_Diagnostics_DiagnosticSource_Tests!S_P_CoreLib_System_Runtime_CompilerServices_AsyncMethodBuilderCore__Start<xunit_execution_dotnet_Xunit_Sdk_TestInvoker_1___c__DisplayClass48_0___InvokeTestMethodAsync_b__1_d<System___Canon>> + 0x5b   
[0x9]   System_Diagnostics_DiagnosticSource_Tests!xunit_execution_dotnet_Xunit_Sdk_TestInvoker_1___c__DisplayClass48_0<System___Canon>___InvokeTestMethodAsync_b__1 + 0x4f   
[0xa]   System_Diagnostics_DiagnosticSource_Tests!xunit_execution_dotnet_Xunit_Sdk_ExecutionTimer__AggregateAsync_d__4__MoveNext + 0xa8   
[0xb]   System_Diagnostics_DiagnosticSource_Tests!S_P_CoreLib_System_Runtime_CompilerServices_AsyncMethodBuilderCore__Start<xunit_execution_dotnet_Xunit_Sdk_ExecutionTimer__AggregateAsync_d__4> + 0x40   
[0xc]   System_Diagnostics_DiagnosticSource_Tests!xunit_execution_dotnet_Xunit_Sdk_ExecutionTimer__AggregateAsync + 0x40   

A simple repro that requires more work since this currently passes

program_github.txt

Callstack of the simple repro (that doesn't fail)

[0x0]   test1!test1_Program__NoExceptionThrownWhenProcessingStaticActivityProperties   
[0x1]   test1!Internal_CompilerGenerated__Module___InvokeRetV + 0x28   
[0x2]   test1!S_P_CoreLib_System_InvokeUtils__CallDynamicInvokeMethod + 0x158   
[0x3]   test1!S_P_Reflection_Execution_Internal_Reflection_Execution_MethodInvokers_InstanceMethodInvoker__Invoke + 0x65   
[0x4]   test1!S_P_Reflection_Core_Internal_Reflection_Core_Execution_MethodInvoker__Invoke + 0x45   
[0x5]   test1!S_P_Reflection_Core_System_Reflection_Runtime_MethodInfos_RuntimeMethodInfo__Invoke + 0x58   
[0x6]   test1!test1_Program__Main + 0x56   

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-NativeAOT-coreclrin-prThere is an active PR which will close this issue when it is merged

    Type

    No type

    Projects

    Status

    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions