extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Provider_GetMeasurementWithRetry_UnhandledException_DoesNotBlockFutureReads fails in CI

Open ericstj opened this issue 1 year ago • 5 comments

https://dev.azure.com/dnceng/internal/_build/results?buildId=2827952&view=ms.vss-test-web.build-test-results-tab&runId=55949761&resultId=107367&paneView=debug

Passed on rerun

Moq.MockException :
Expected invocation on the mock exactly 4 times, but was 5 times: p => p.GetMemoryUsageInBytes()


Performed invocations:


Mock[ILinuxUtilizationParser:1](https://dev.azure.com/dnceng/internal/_build/results?buildId=2827952&view=ms.vss-test-web.build-test-results-tab&runId=55949761&resultId=107367&paneView=debug) (p):



          

              <BUTTON  aria-label="Copy to clipboard"  class='copy-btn bolt-button bolt-icon-button enabled subtle icon-only bolt-focus-treatment'>
                Copy to clipboard
                
                   
                
              </BUTTON>
              
  ILinuxUtilizationParser.GetAvailableMemoryInBytes()
  ILinuxUtilizationParser.GetHostCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetCgroupCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetHostCpuCount()
  ILinuxUtilizationParser.GetCgroupLimitedCpus()
  ILinuxUtilizationParser.GetCgroupRequestCpu()
  ILinuxUtilizationParser.GetHostCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetCgroupCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetHostCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetCgroupCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetHostCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetCgroupCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetMemoryUsageInBytes()
  ILinuxUtilizationParser.GetMemoryUsageInBytes()
  ILinuxUtilizationParser.GetMemoryUsageInBytes()
  ILinuxUtilizationParser.GetHostCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetCgroupCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetHostCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetCgroupCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetHostCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetCgroupCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetMemoryUsageInBytes()
  ILinuxUtilizationParser.GetHostCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetCgroupCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetHostCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetCgroupCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetHostCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetCgroupCpuUsageInNanoseconds()
  ILinuxUtilizationParser.GetMemoryUsageInBytes()


          

          

Stack trace
[at Moq.Mock.Verify(Mock mock, LambdaExpression expression, Times times, String failMessage) in C:\projects\moq4\src\Moq\Mock.cs:line 330](https://dev.azure.com/dnceng/internal/_git/81d264ec-3d9c-4bde-a06f-1b771c1efc58?path=%2Fsrc%2FMoq%2FMock.cs&version=GBericstj%2FfixBuildBreak&_a=contents&line=330&lineEnd=331&lineStartColumn=1&lineEndColumn=1&lineStyle=plain)
[at Moq.Mock`1.Verify[TResult](Expression`1 expression, Times times) in C:\projects\moq4\src\Moq\Mock`1.cs:line 825](https://dev.azure.com/dnceng/internal/_git/81d264ec-3d9c-4bde-a06f-1b771c1efc58?path=%2Fsrc%2FMoq%2FMock%601.cs&version=GBericstj%2FfixBuildBreak&_a=contents&line=825&lineEnd=826&lineStartColumn=1&lineEndColumn=1&lineStyle=plain)
[at Microsoft.Extensions.Diagnostics.ResourceMonitoring.Linux.Test.LinuxUtilizationProviderTests.Provider_GetMeasurementWithRetry_UnhandledException_DoesNotBlockFutureReads() in /mnt/vss/_work/1/s/test/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests/Linux/LinuxUtilizationProviderTests.cs:line 417](https://dev.azure.com/dnceng/internal/_git/81d264ec-3d9c-4bde-a06f-1b771c1efc58?path=%2Fmnt%2Fvss%2F_work%2F1%2Fs%2Ftest%2FLibraries%2FMicrosoft.Extensions.Diagnostics.ResourceMonitoring.Tests%2FLinux%2FLinuxUtilizationProviderTests.cs&version=GBericstj%2FfixBuildBreak&_a=contents&line=417&lineEnd=418&lineStartColumn=1&lineEndColumn=1&lineStyle=plain)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

ericstj avatar Oct 30 '25 22:10 ericstj

@amadeuszl @evgenyfedorov2

ericstj avatar Oct 30 '25 22:10 ericstj

@ericstj I will monitor that test, was doing some changes there recently

amadeuszl avatar Nov 25 '25 14:11 amadeuszl

I haven't seen any failures since the changes (2 weeks), closing then

amadeuszl avatar Dec 10 '25 09:12 amadeuszl

@ericstj I have found this issue because of the text:

              <BUTTON  aria-label="Copy to clipboard"  class='copy-btn bolt-button bolt-icon-button enabled subtle icon-only bolt-focus-treatment'>
                Copy to clipboard
                
                   
                
              </BUTTON>

I have currently some tests sporadically failing, that contain this text in the error message. I don’t know where this text is coming from. I seems completely unrelated to my test or the failing test condition. My Test runs on a selfhosted Agent on Windows 11 using the Runtime 8.0.22 x86 (through Environentvariable DOTNET_ROOT(x86)), NUnit 4.4.0, NUnit3TestAdapter 5.2.0 and Microsoft.NET.Test.Sdk 18.0.1

did you expect this text in your case or does it make sense to you? Has your test setup similarities to mine (I dont have access to the link your provided (error 401))?

chkoella avatar Dec 11 '25 10:12 chkoella

@chkoella -- I that text is just some boilerplate in the test result. The existence of that snippet doesn't indicate any correlation with this issue.
Image Similar to https://github.com/dotnet/aspnetcore/pull/63767. If anything it might be a bug in how AzDo is rendering the test result to html. If you're seeing this in your own tests, you might want to look in the raw result data (the test results XML, console output, etc). Those might have more actionable test results data.

ericstj avatar Dec 11 '25 19:12 ericstj