dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.01k stars 4.67k forks source link

Test failure on Android x64 Mono System.Threading.ThreadPool.Tests #43781

Closed eerhardt closed 3 years ago

eerhardt commented 3 years ago

See

Executed on a00006C
chmod: cannot access '/home/helixbot/work/AB2A0945/w/AA02093A/e/*.sh': No such file or directory
+ export PATH=/home/helixbot/work/AB2A0945/p/dotnet-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
+ export DOTNET_ROOT=/home/helixbot/work/AB2A0945/p/dotnet-cli
+ export DOTNET_CLI_TELEMETRY_OPTOUT=1
+ export PATH=/home/helixbot/work/AB2A0945/p/xharness-cli:/home/helixbot/work/AB2A0945/p/dotnet-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
+ export XHARNESS_DISABLE_COLORED_OUTPUT=true
+ export XHARNESS_LOG_WITH_TIMESTAMPS=true
+ export XHARNESS_CLI_PATH=/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/tools/netcoreapp3.1/any/Microsoft.DotNet.XHarness.CLI.dll
+ dotnet exec /home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/tools/netcoreapp3.1/any/Microsoft.DotNet.XHarness.CLI.dll android test --app System.Threading.ThreadPool.Tests.apk --output-directory /home/helixbot/work/AB2A0945/w/AA02093A/uploads --timeout 720 -p=net.dot.System.Threading.ThreadPool.Tests -v -i=net.dot.MonoRunner
XHarness command issued: android test --app System.Threading.ThreadPool.Tests.apk --output-directory /home/helixbot/work/AB2A0945/w/AA02093A/uploads --timeout 720 -p=net.dot.System.Threading.ThreadPool.Tests -v -i=net.dot.MonoRunner
[03:48:46] dbug: Android Test command called: App = /home/helixbot/work/AB2A0945/w/AA02093A/e/System.Threading.ThreadPool.Tests.apk
                 Instrumentation Name = net.dot.MonoRunner
[03:48:46] dbug: Output Directory:/home/helixbot/work/AB2A0945/w/AA02093A/uploads
                 Timeout = 720 seconds.
[03:48:46] dbug: Arguments to instrumentation:
[03:48:46] dbug: ADBRunner using ADB.exe supplied from /home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/tools/netcoreapp3.1/any/../../../runtimes/any/native/adb/linux/adb
[03:48:46] dbug: Full resolved path:'/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb'
[03:48:46] info: Will attempt to run device on detected architecture: 'x86_64'
[03:48:46] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb  start-server'
[03:48:47] dbug: 
[03:48:47] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb  devices -l'
[03:48:48] dbug: Evaluating output line for device serial: emulator-5554          device product:sdk_phone_x86_64 model:Android_SDK_built_for_x86_64 device:generic_x86_64 transport_id:1
[03:48:48] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb  -s emulator-5554 shell getprop ro.product.cpu.abi'
[03:48:49] dbug: Evaluating output line for device serial: emulator-5556          device product:sdk_phone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:2
[03:48:49] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb  -s emulator-5556 shell getprop ro.product.cpu.abi'
[03:48:50] info: Using first-found compatible device of 2 total- serial: 'emulator-5554' - Arch: x86_64
[03:48:50] info: Active Android device set to serial 'emulator-5554'
[03:48:50] info: Waiting for device to be available (max 5 minutes)
[03:48:50] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb -s emulator-5554 wait-for-device'
[03:48:52] dbug: 
[03:48:52] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb -s emulator-5554 logcat -c'
[03:48:53] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb -s emulator-5554 version'
[03:48:54] dbug: Working with Android Debug Bridge version 1.0.41
                 Version 29.0.6-6198805
                 Installed as /home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb

[03:48:54] info: Attempting to remove apk 'net.dot.System.Threading.ThreadPool.Tests': 
[03:48:54] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb -s emulator-5554 uninstall net.dot.System.Threading.ThreadPool.Tests'
[03:48:55] info: APK 'net.dot.System.Threading.ThreadPool.Tests' not on device.
[03:48:55] info: Attempting to install /home/helixbot/work/AB2A0945/w/AA02093A/e/System.Threading.ThreadPool.Tests.apk: 
[03:48:55] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb -s emulator-5554 install "/home/helixbot/work/AB2A0945/w/AA02093A/e/System.Threading.ThreadPool.Tests.apk"'
[03:48:56] info: Successfully installed /home/helixbot/work/AB2A0945/w/AA02093A/e/System.Threading.ThreadPool.Tests.apk.
[03:48:56] info: Killing all running processes for 'net.dot.System.Threading.ThreadPool.Tests': 
[03:48:56] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb -s emulator-5554 shell am kill --user all net.dot.System.Threading.ThreadPool.Tests'
[03:48:57] dbug: Success!

[03:48:57] info: Starting instrumentation class 'net.dot.MonoRunner' on net.dot.System.Threading.ThreadPool.Tests
[03:48:57] dbug: Raw command: 'shell am instrument  -w net.dot.System.Threading.ThreadPool.Tests/net.dot.MonoRunner'
[03:48:57] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb -s emulator-5554 shell am instrument  -w net.dot.System.Threading.ThreadPool.Tests/net.dot.MonoRunner'
[03:49:30] info: Running instrumentation class net.dot.MonoRunner took 33.3115382 seconds
[03:49:30] dbug: Exit code: 0
                 Standard Output:
                 INSTRUMENTATION_RESULT: return-code=1
                 INSTRUMENTATION_RESULT: test-results-path=/storage/emulated/0/Android/data/net.dot.System.Threading.ThreadPool.Tests/files/Documents/testResults.xml
                 INSTRUMENTATION_CODE: 1

[03:49:30] info: Found XML result file: '/storage/emulated/0/Android/data/net.dot.System.Threading.ThreadPool.Tests/files/Documents/testResults.xml'(key: test-results-path)
[03:49:30] info: Attempting to pull contents of /storage/emulated/0/Android/data/net.dot.System.Threading.ThreadPool.Tests/files/Documents/testResults.xml to /home/helixbot/work/AB2A0945/w/AA02093A/uploads
[03:49:30] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb -s emulator-5554 pull /storage/emulated/0/Android/data/net.dot.System.Threading.ThreadPool.Tests/files/Documents/testResults.xml /tmp/mfkbo5td.u4o'
[03:49:31] dbug: Copied 1 files to /home/helixbot/work/AB2A0945/w/AA02093A/uploads.
[03:49:31] info: Instrumentation finished normally with exit code 1
[03:49:34] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb -s emulator-5554 logcat -d '
[03:49:35] info: Wrote current ADB log to /home/helixbot/work/AB2A0945/w/AA02093A/uploads/adb-logcat-net.dot.System.Threading.ThreadPool.Tests.log
[03:49:35] info: Attempting to remove apk 'net.dot.System.Threading.ThreadPool.Tests': 
[03:49:35] dbug: Executing command: '/home/helixbot/work/AB2A0945/p/microsoft.dotnet.xharness.cli/1.0.0-prerelease.20519.2/runtimes/any/native/adb/linux/adb -s emulator-5554 uninstall net.dot.System.Threading.ThreadPool.Tests'
[03:49:36] info: Successfully uninstalled net.dot.System.Threading.ThreadPool.Tests.
[03:49:36] fail: Non-success instrumentation exit code: 1, expected: 0
XHarness exit code: 1001

cc @ViktorHofer @safern

safern commented 3 years ago

The test that failed is: ThreadPoolCanPickUpOneOrMoreWorkItemsWhenThreadIsAvailable

Error:

Assert.True() Failure\nExpected: True\nActual:   False

Stack:

at System.Threading.Tests.ThreadTestHelpers.CheckedWait(WaitHandle wh) in /_/src/libraries/Common/tests/System/Threading/ThreadTestHelpers.cs:line 153
   at System.Threading.ThreadPools.Tests.ThreadPoolTests.ThreadPoolCanPickUpOneOrMoreWorkItemsWhenThreadIsAvailable() in /_/src/libraries/System.Threading.ThreadPool/tests/ThreadPoolTests.cs:line 608
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
safern commented 3 years ago

cc: @akoeplinger @steveisok

akoeplinger commented 3 years ago

This is tracked in https://github.com/dotnet/runtime/issues/43754, the test was disabled in master with https://github.com/dotnet/runtime/pull/43755