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

Test failure BasicEventSourceTests.TestsWrite.Test_Write_T_ETW #88305

Closed
v-wenyuxu opened this issue Jul 3, 2023 · 16 comments · Fixed by #99261
Closed

Test failure BasicEventSourceTests.TestsWrite.Test_Write_T_ETW #88305

v-wenyuxu opened this issue Jul 3, 2023 · 16 comments · Fixed by #99261
Assignees
Labels
arch-x86 area-System.Diagnostics.Tracing blocking-clean-ci-optional Blocking optional rolling runs JitStress CLR JIT issues involving JIT internal stress modes os-windows
Milestone

Comments

@v-wenyuxu
Copy link

Failed in: runtime-coreclr libraries-jitstress-random 20230701.1

Failed tests:

net8.0-windows-Release-x86-CoreCLR_checked-jitstress_random_2-Windows.10.Amd64.Open
    - BasicEventSourceTests.TestsWrite.Test_Write_T_ETW
    - BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_Manifest_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ComplexData_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_Manifest_ETW
    - BasicEventSourceTests.FuzzyTests.Test_Write_Fuzzy

Error message:

System.Exception : Need to be elevated to run. 

Stack trace:

   at BasicEventSourceTests.EtwListener..ctor(String dataFileName, String sessionName) in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs:line 42
   at BasicEventSourceTests.TestsWrite.Test_Write_T_ETW() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWrite.Etw.cs:line 24
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs:line 59
@v-wenyuxu v-wenyuxu added arch-x86 os-windows JitStress CLR JIT issues involving JIT internal stress modes labels Jul 3, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 3, 2023
@ghost
Copy link

ghost commented Jul 3, 2023

Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti
See info in area-owners.md if you want to be subscribed.

Issue Details

Failed in: runtime-coreclr libraries-jitstress-random 20230701.1

Failed tests:

net8.0-windows-Release-x86-CoreCLR_checked-jitstress_random_2-Windows.10.Amd64.Open
    - BasicEventSourceTests.TestsWrite.Test_Write_T_ETW
    - BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_Manifest_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ComplexData_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_Manifest_ETW
    - BasicEventSourceTests.FuzzyTests.Test_Write_Fuzzy

Error message:

System.Exception : Need to be elevated to run. 

Stack trace:

   at BasicEventSourceTests.EtwListener..ctor(String dataFileName, String sessionName) in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs:line 42
   at BasicEventSourceTests.TestsWrite.Test_Write_T_ETW() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWrite.Etw.cs:line 24
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs:line 59
Author: v-wenyuxu
Assignees: -
Labels:

arch-x86, area-System.Diagnostics.Tracing, os-windows, JitStress, untriaged

Milestone: -

@tommcdon
Copy link
Member

tommcdon commented Jul 5, 2023

@davmason - possibly a test configuraiton issue

@tommcdon tommcdon added this to the 8.0.0 milestone Jul 5, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jul 5, 2023
@v-wenyuxu
Copy link
Author

Failed again in: runtime-coreclr libraries-jitstress-random 20230722.1

Failed tests:

net8.0-windows-Release-x86-CoreCLR_checked-jitstress_random_2-Windows.10.Amd64.Open
    - BasicEventSourceTests.TestsWrite.Test_Write_T_ETW
    - BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_Manifest_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ComplexData_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_Manifest_ETW
    - BasicEventSourceTests.FuzzyTests.Test_Write_Fuzzy

Error message:

System.Exception : Need to be elevated to run. 

Stack trace:

   at BasicEventSourceTests.EtwListener..ctor(String dataFileName, String sessionName) in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs:line 42
   at BasicEventSourceTests.TestsWrite.Test_Write_T_ETW() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWrite.Etw.cs:line 24
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

@davmason
Copy link
Member

@hoyosjs do we expect the CI machines to be run elevated? This fails intermittently, not sure why it works sometimes and doesn't sometimes

@hoyosjs
Copy link
Member

hoyosjs commented Jul 27, 2023

cc: @dotnet/dnceng As far as I know - the agent running test has privileges, but I don't know if we run in elevation.

@tommcdon tommcdon modified the milestones: 8.0.0, 9.0.0 Jul 31, 2023
@v-wenyuxu
Copy link
Author

Failed again in: runtime-coreclr libraries-jitstress-random 20230819.1

Failed tests:

net8.0-windows-Release-x86-CoreCLR_checked-jitstress_random_2-Windows.10.Amd64.Open
    - BasicEventSourceTests.TestsWrite.Test_Write_T_ETW
    - BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_Manifest_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ComplexData_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_Manifest_ETW
    - BasicEventSourceTests.FuzzyTests.Test_Write_Fuzzy

Error message:

System.Exception : Need to be elevated to run. 

Stack trace:

   at BasicEventSourceTests.EtwListener..ctor(String dataFileName, String sessionName) in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs:line 42
   at BasicEventSourceTests.TestsWrite.Test_Write_T_ETW() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWrite.Etw.cs:line 24
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

@davmason
Copy link
Member

Closing since we haven't seen the elevation failure in some time

@v-wenyuxu v-wenyuxu reopened this Oct 30, 2023
@v-wenyuxu
Copy link
Author

Failed again in: runtime-coreclr libraries-jitstress-random 20231028.1

Failed tests:

net9.0-windows-Release-x86-CoreCLR_checked-jitstress_random_1-Windows.10.Amd64.Open
    - BasicEventSourceTests.TestsWrite.Test_Write_T_ETW
    - BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_Manifest_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ComplexData_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_Manifest_ETW
    - BasicEventSourceTests.FuzzyTests.Test_Write_Fuzzy

Error message:

System.Exception : Need to be elevated to run. 

Stack trace:

   at BasicEventSourceTests.EtwListener..ctor(String dataFileName, String sessionName) in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs:line 42
   at BasicEventSourceTests.TestsWrite.Test_Write_T_ETW() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWrite.Etw.cs:line 24
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

@danmoseley
Copy link
Member

The stack above is protected

[ConditionalFact(nameof(IsProcessElevatedAndNotWindowsNanoServer))]

Either the protection is buggy or the EtwListener constructor is getting ERROR_ACCESS_DENIED or whatever due to flaky OS and the message is inappropriate?

@danmoseley
Copy link
Member

It might be interesting to put Debug.Assert(!Environment.IsPrivilegedProcess) in the implementation where it is throwing with this message.

@VincentBu
Copy link
Contributor

Failed in: runtime-coreclr libraries-jitstress-random 20231111.1

Failed tests:

net9.0-windows-Release-x86-CoreCLR_checked-jitstress_random_2-Windows.10.Amd64.Open
    - BasicEventSourceTests.TestsWrite.Test_Write_T_ETW
    - BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_Manifest_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ComplexData_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_SelfDescribing_ETW
    - BasicEventSourceTests.TestsWriteEvent.Test_WriteEvent_ByteArray_Manifest_ETW
    - BasicEventSourceTests.FuzzyTests.Test_Write_Fuzzy

Error message:

 System.Exception : Need to be elevated to run. 

Stack trace:

    at BasicEventSourceTests.EtwListener..ctor(String dataFileName, String sessionName) in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs:line 42
   at BasicEventSourceTests.TestsWrite.Test_Write_T_ETW() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsWrite.Etw.cs:line 24
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

@mikelle-rogers
Copy link
Member

@davmason, what is the status of this issue?

@BruceForstall BruceForstall added the blocking-clean-ci-optional Blocking optional rolling runs label Nov 13, 2023
@davmason
Copy link
Member

davmason commented Dec 1, 2023

The failures are not understood here, something is wrong with the infrastructure allowing tests to run when the process is not elevated. Disabling with #95498 to get them off the blocking list until someone can investigate

@v-wenyuxu
Copy link
Author

Failed again in: runtime-coreclr libraries-jitstress-random 20231209.1

Failed tests:

net9.0-windows-Release-x86-CoreCLR_checked-jitstress_random_1-Windows.10.Amd64.Open
    - BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener

Error message:

System.Exception : Need to be elevated to run. 

Stack trace:

   at BasicEventSourceTests.EtwListener..ctor(String dataFileName, String sessionName) in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs:line 42
   at BasicEventSourceTests.TestsUserErrors.<>c.<Test_BadEventSource_MismatchedIds_WithEtwListener>b__0_0() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.Etw.cs:line 36
   at BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.Etw.cs:line 48
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

@v-wenyuxu
Copy link
Author

Failed again in: runtime-coreclr libraries-jitstress-random 20240106.1

Failed tests:

net9.0-windows-Release-x86-CoreCLR_checked-jitstress_random_1-Windows.10.Amd64.Open
    - BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener

Error message:

System.Exception : Need to be elevated to run. 

Stack trace:

   at BasicEventSourceTests.EtwListener..ctor(String dataFileName, String sessionName) in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs:line 42
   at BasicEventSourceTests.TestsUserErrors.<>c.<Test_BadEventSource_MismatchedIds_WithEtwListener>b__0_0() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.Etw.cs:line 36
   at BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.Etw.cs:line 48
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

@v-wenyuxu
Copy link
Author

Failed in: runtime-coreclr libraries-jitstress-random 20240302.1

Failed tests:

net9.0-windows-Release-x86-CoreCLR_checked-jitstress_random_2-Windows.10.Amd64.Open
    - BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener

Error message:

 System.Exception : Need to be elevated to run. 

Stack trace:

   at BasicEventSourceTests.EtwListener..ctor(String dataFileName, String sessionName) in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/Harness/EtwListener.cs:line 42
   at BasicEventSourceTests.TestsUserErrors.<>c.<Test_BadEventSource_MismatchedIds_WithEtwListener>b__0_0() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.Etw.cs:line 36
   at BasicEventSourceTests.TestsUserErrors.Test_BadEventSource_MismatchedIds_WithEtwListener() in /_/src/libraries/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestsUserErrors.Etw.cs:line 48
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.CoreCLR.cs:line 36
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs:line 57

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Mar 4, 2024
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Mar 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x86 area-System.Diagnostics.Tracing blocking-clean-ci-optional Blocking optional rolling runs JitStress CLR JIT issues involving JIT internal stress modes os-windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants