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

[browser][wbt] fails with InvalidOperationException: There is no currently active test #105315

Open
ilonatommy opened this issue Jul 23, 2024 · 8 comments
Assignees
Labels
area-Infrastructure-mono Known Build Error Use this to report build issues in the .NET Helix tab
Milestone

Comments

@ilonatommy
Copy link
Member

ilonatommy commented Jul 23, 2024

Build Information

Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=751591
Build error leg or test failing: Workloads-NoWebcil-NoFingerprint-ST-Wasm.Build.Tests.WorkItemExecution
Pull request: #105302

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "Unhandled exception. System.InvalidOperationException: There is no currently active test.",
  "ErrorPattern": "",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=751591
Error message validated: [Unhandled exception. System.InvalidOperationException: There is no currently active test.]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 7/23/2024 1:57:11 PM UTC

Report

Build Definition Test Pull Request
847951 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #109028
847712 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #109028
846075 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108352
846994 dotnet/runtime NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108990
846739 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108968
846723 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
843240 dotnet/runtime NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108886
844609 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108188
844600 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108924
843491 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108837
843118 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108837
841441 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108789
842818 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
842067 dotnet/runtime NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108547
841950 dotnet/runtime NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108837
839688 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108711
841088 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108707
841002 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
838974 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108765
839904 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108789
839757 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108636
839599 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108780
839467 dotnet/runtime Workloads-ST-Wasm.Build.Tests.IcuTests.WorkItemExecution
839075 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108745
838220 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108707
838090 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108401
835013 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108704
833507 dotnet/runtime Workloads-ST-Wasm.Build.Tests.BuildPublishTests.WorkItemExecution #108691
832375 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108478
831372 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108582
831703 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108188
831213 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #105427
830427 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108636
830171 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108583
829556 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107772
828641 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
827220 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108370
828350 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108514
827823 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
826745 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108494
826519 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108528
826085 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107388
825990 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108324
825949 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107280
825855 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #105427
825800 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
825766 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #106963
825727 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107865
823583 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108425
823311 dotnet/runtime Workloads-ST-Wasm.Build.Tests.BuildPublishTests.WorkItemExecution #108434
822330 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107462
822558 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108401
822531 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107865
822496 dotnet/runtime Workloads-ST-Wasm.Build.Tests.BuildPublishTests.WorkItemExecution
822379 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
822338 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108370
821569 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108188
820920 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107772
820756 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
820107 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
819536 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #105427
819326 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #105838
819098 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108281
818966 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107547
818843 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108271
817165 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #106977
816876 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.BuildPublishTests.WorkItemExecution #108190
816861 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108188
816829 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108184
816784 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108179
816686 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
816477 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #106977
815947 dotnet/runtime Workloads-ST-Wasm.Build.Tests.BuildPublishTests.WorkItemExecution #108006
815396 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107865
815073 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
814994 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108105
814951 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107865
814950 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
814895 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107912
814425 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108085
814419 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107772
814352 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.BuildPublishTests.WorkItemExecution
814335 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
813991 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #106875
813958 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #108059
813883 dotnet/runtime Workloads-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #106599
813844 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution
813753 dotnet/runtime Workloads-NoWebcil-ST-Wasm.Build.Tests.SatelliteAssembliesTests.WorkItemExecution #107772

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
1 18 88
@ilonatommy ilonatommy added blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' Known Build Error Use this to report build issues in the .NET Helix tab labels Jul 23, 2024
@ilonatommy ilonatommy added this to the 9.0.0 milestone Jul 23, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

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

@maraf maraf self-assigned this Jul 23, 2024
@maraf
Copy link
Member

maraf commented Jul 25, 2024

I'm not able to reproduce it locally. It doesn't seem related to fingerprinting.
The message comes from xunit orchestration. It looks like a race condition.

@maraf maraf changed the title [browser] NoFingerprint wbt fails with InvalidOperationException [browser][wbt] fails with InvalidOperationException: There is no currently active test Jul 25, 2024
@maraf
Copy link
Member

maraf commented Jul 26, 2024

@mkhamoyan Can you please look into this one? It's quite low priority (if don't start happening more often, but it doesn't seem so far). The exception comes from ToolCommand https://github.com/dotnet/runtime/blob/main/src/mono/wasm/Wasm.Build.Tests/Common/ToolCommand.cs#L110
My theory is that the process output arrives in .NET after the waiting for process to finish (as thus the test finished). Something like unsubscribing the handlers after the wait might be enough.

@maraf maraf assigned mkhamoyan and unassigned maraf Jul 26, 2024
@maraf maraf removed the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Jul 26, 2024
@ilonatommy
Copy link
Member Author

Note for the future: unsubscribing from the handlers did not fully fix the issue, the last 2 hits are on PRs created after the fix was merged.

@steveisok steveisok modified the milestones: 9.0.0, 10.0.0 Aug 9, 2024
@lewing lewing assigned ilonatommy and unassigned mkhamoyan Sep 26, 2024
@ilonatommy
Copy link
Member Author

ilonatommy commented Sep 27, 2024

Following the stack:

_testOutput.WriteLine($"{label} {message}");

https://github.com/xunit/xunit/blob/6bfa188331f6d4ed6e877ab6da5e7b2725ccd721/src/xunit.v3.core/Framework/TestOutputHelper.cs#L45

We might be trying to WriteLine in a try-catch, after xunit threw an exception. I'm gonna wrap
protected readonly ITestOutputHelper _testOutput;
in a custom class, that would call ITestOutputHelper's methods in its own try-catch and log to console in case something goes wrong.

@ilonatommy
Copy link
Member Author

Sample log:

    Wasm.Build.Tests.SatelliteAssembliesTests.ResourcesFromMainAssembly(buildArgs: BuildArgs { ProjectName = placeholder, Config = Release, AOT = False, ProjectFileContents = placeholder, ExtraBuildArgs =  }, nativeRelink: True, argCulture: "es-ES", host: V8, id: "iomynnb2_4h0") [STARTING]

** -------- publish -------- **

Binlog path: /root/helix/work/workitem/uploads/xharness-output/logs/iomynnb2_4h0/iomynnb2_4h0-publish.binlog
[] Executing (Captured Output) - /root/helix/work/workitem/e/dotnet-latest/dotnet publish -bl:/root/helix/work/workitem/uploads/xharness-output/logs/iomynnb2_4h0/iomynnb2_4h0-publish.binlog -p:Configuration=Release -nr:false   -  in pwd /root/helix/work/workitem/e/wbt artifacts/iomynnb2_4h0
	[DOTNET_ROOT] = /root/helix/work/workitem/e/dotnet-latest
	[DOTNET_INSTALL_DIR] = /root/helix/work/workitem/e/dotnet-latest
	[DOTNET_MULTILEVEL_LOOKUP] = 0
	[DOTNET_SKIP_FIRST_TIME_EXPERIENCE] = 1
	[PATH] = /root/helix/work/workitem/e/dotnet-latest:/__w/1/s/artifacts/bin/geckodriver/geckodriver:/root/helix/work/correlation/dotnet-latest:/root/helix/work/correlation/xharness-cli:/root/helix/work/correlation/dotnet-cli:/root/helix/work/correlation/chrome-linux:/root/helix/work/correlation/chromedriver_linux64:/home/helixbot/.jsvu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
	[EM_WORKAROUND_PYTHON_BUG_34780] = 1
	[WasmEnableWebCil] = false
	[NUGET_PACKAGES] = /root/helix/work/workitem/e/wbt artifacts/nuget/iomynnb2_4h0
[]   Determining projects to restore...
Unhandled exception. System.InvalidOperationException: There is no currently active test.
   at Xunit.Sdk.TestOutputHelper.QueueTestOutput(String output) in /_/src/xunit.execution/Sdk/Frameworks/TestOutputHelper.cs:line 61
   at Wasm.Build.Tests.BuildTestBase.<>c__DisplayClass47_0.<RunProcessAsync>g__LogData|0(String label, String message) in /_/src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs:line 544
   at System.Diagnostics.AsyncStreamReader.FlushMessageQueue(Boolean rethrowInNewThread)
--- End of stack trace from previous location ---
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
./RunTests.sh: line 102:    80 Aborted                 (core dumped) dotnet exec xunit.console.dll Wasm.Build.Tests.dll -xml $XHARNESS_OUT/testResults.xml $HELIX_XUNIT_ARGS -nocolor -verbose -notrait category=IgnoreForCI -notrait category=failing $XUnitTraitArg $RSP_FILE

All the available failure logs are from Linux.

@ilonatommy
Copy link
Member Author

The last 2 hits are on PRs that had the #108319 change. It's still unfixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Infrastructure-mono Known Build Error Use this to report build issues in the .NET Helix tab
Projects
None yet
Development

No branches or pull requests

5 participants