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

System.Threading.Tasks.Parallel.Tests are timing out on s390x #101380

Closed
akoeplinger opened this issue Apr 22, 2024 · 5 comments · Fixed by #101527
Closed

System.Threading.Tasks.Parallel.Tests are timing out on s390x #101380

akoeplinger opened this issue Apr 22, 2024 · 5 comments · Fixed by #101527
Labels
arch-s390x Related to s390x architecture (unsupported) area-System.Threading.Tasks disabled-test The test is disabled in source code against the issue
Milestone

Comments

@akoeplinger
Copy link
Member

akoeplinger commented Apr 22, 2024

Recent runs of the runtime-community pipeline are timing out because of a long running test that is likely hanging:

  Discovering: System.Threading.Tasks.Parallel.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Threading.Tasks.Parallel.Tests (found 118 of 197 test cases)
  Starting:    System.Threading.Tasks.Parallel.Tests (parallel test collections = on [2 threads], stop on fail = off)
   System.Threading.Tasks.Parallel.Tests: [Long Running Test] 'System.Threading.Tasks.Tests.ParallelForEachAsyncTests.AllItemsEnumeratedOnce_For', Elapsed: 00:02:11
   System.Threading.Tasks.Parallel.Tests: [Long Running Test] 'System.Threading.Tasks.Tests.ParallelForEachAsyncTests.AllItemsEnumeratedOnce_For', Elapsed: 00:04:11
   System.Threading.Tasks.Parallel.Tests: [Long Running Test] 'System.Threading.Tasks.Tests.ParallelForEachAsyncTests.AllItemsEnumeratedOnce_For', Elapsed: 00:06:11
   System.Threading.Tasks.Parallel.Tests: [Long Running Test] 'System.Threading.Tasks.Tests.ParallelForEachAsyncTests.AllItemsEnumeratedOnce_For', Elapsed: 00:08:11
   System.Threading.Tasks.Parallel.Tests: [Long Running Test] 'System.Threading.Tasks.Tests.ParallelForEachAsyncTests.AllItemsEnumeratedOnce_For', Elapsed: 00:10:11
   System.Threading.Tasks.Parallel.Tests: [Long Running Test] 'System.Threading.Tasks.Tests.ParallelForEachAsyncTests.AllItemsEnumeratedOnce_For', Elapsed: 00:12:11
   System.Threading.Tasks.Parallel.Tests: [Long Running Test] 'System.Threading.Tasks.Tests.ParallelForEachAsyncTests.AllItemsEnumeratedOnce_For', Elapsed: 00:14:11
['System.Threading.Tasks.Parallel.Tests' END OF WORK ITEM LOG: Command timed out, and was killed]

/cc @uweigand

@akoeplinger akoeplinger added area-System.Threading.Tasks arch-s390x Related to s390x architecture (unsupported) labels Apr 22, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 22, 2024
@akoeplinger
Copy link
Member Author

Interesting, the same run also failed System.Threading.Tests but for some reason the Helix workitem didn't fail...

  Discovering: System.Threading.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Threading.Tests (found 263 of 297 test cases)
  Starting:    System.Threading.Tests (parallel test collections = on [2 threads], stop on fail = off)
    System.Threading.Tests.InterlockedTests.InterlockedExchange_Int16 [FAIL]
      Assert.Equal() Failure: Values differ
      Expected: 42
      Actual:   0
      Stack Trace:
        /_/src/libraries/System.Threading/tests/InterlockedTests.cs(171,0): at System.Threading.Tests.InterlockedTests.InterlockedExchange_Int16()
        /_/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.Mono.cs(22,0): at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(57,0): at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    System.Threading.Tests.InterlockedTests.InterlockedCompareExchange_UInt16 [FAIL]
      Assert.Equal() Failure: Values differ
      Expected: 42
      Actual:   0
      Stack Trace:
        /_/src/libraries/System.Threading/tests/InterlockedTests.cs(369,0): at System.Threading.Tests.InterlockedTests.InterlockedCompareExchange_UInt16()
        /_/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.Mono.cs(22,0): at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(57,0): at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    System.Threading.Tests.InterlockedTests.InterlockedExchange_UInt16 [FAIL]
      Assert.Equal() Failure: Values differ
      Expected: 42
      Actual:   0
      Stack Trace:
        /_/src/libraries/System.Threading/tests/InterlockedTests.cs(182,0): at System.Threading.Tests.InterlockedTests.InterlockedExchange_UInt16()
        /_/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.Mono.cs(22,0): at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(57,0): at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    System.Threading.Tests.InterlockedTests.InterlockedCompareExchange_Int16 [FAIL]
      Assert.Equal() Failure: Values differ
      Expected: 42
      Actual:   0
      Stack Trace:
        /_/src/libraries/System.Threading/tests/InterlockedTests.cs(353,0): at System.Threading.Tests.InterlockedTests.InterlockedCompareExchange_Int16()
        /_/src/mono/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.Mono.cs(22,0): at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(57,0): at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
    System.Threading.Tests.ThreadLocalTests.RunThreadLocalTest8_Values_NegativeCases [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
    System.Threading.Tests.ThreadLocalTests.RunThreadLocalTest5_Dispose [SKIP]
      Condition(s) not met: "IsThreadingAndPreciseGcSupported"
    System.Threading.Tests.ThreadLocalTests.RunThreadLocalTest7_WeakReference [SKIP]
      Condition(s) not met: "IsPreciseGcSupported"
  Finished:    System.Threading.Tests
=== TEST EXECUTION SUMMARY ===
   System.Threading.Tests  Total: 531, Errors: 0, Failed: 4, Skipped: 3, Time: 10.432s

@uweigand
Copy link
Contributor

We've seen the timeouts on the CI machine, and @giritrivedi has been trying to reproduce them. Unfortunately, when building and running the tests locally, those timeouts do not occur ... Giridhar is currently trying to see if using cross-built test assemblies makes any difference.

Thanks for pointing out the SystemThreading.Tests failures, we'll look into those.

akoeplinger added a commit that referenced this issue Apr 22, 2024
akoeplinger added a commit that referenced this issue Apr 22, 2024
@akoeplinger
Copy link
Member Author

I disabled the AllItemsEnumeratedOnce_For test in #101389

@akoeplinger akoeplinger added disabled-test The test is disabled in source code against the issue and removed untriaged New issue has not been triaged by the area owner labels Apr 22, 2024
@akoeplinger akoeplinger added this to the Future milestone Apr 22, 2024
@uweigand
Copy link
Contributor

Thanks for pointing out the SystemThreading.Tests failures, we'll look into those.

Looks like #99011 introduced a regression on big-endian hosts:

int bitOffset =
    (int)((BitConverter.IsLittleEndian ? offset : sizeof(uint) - offset - sizeof(byte)) * 8); // to bit offset

This computation is used for both 8-bit and 16-bit fallbacks - but it is incorrect for 16-bit (should be sizeof(short) instead of sizeof(byte)).

@stephentoub
Copy link
Member

cc: @MichalPetryka

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-s390x Related to s390x architecture (unsupported) area-System.Threading.Tasks disabled-test The test is disabled in source code against the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants