question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reachability helper feature hangs tests in some scenario

See original GitHub issue

After updating to Coverlet 3.0.0, one of the test projects doesn’t run anymore. The process is stuck at:

Test run for C:\Users\mezia\source\repos\Meziantou.Framework\tests\Meziantou.Framework.SingleInstance.Tests\bin\Debug\net461\Meziantou.Framework.SingleInstance.Tests.dll (.NETFramework,Version=v4.6.1)
Microsoft (R) Test Execution Command Line Tool Version 16.8.3
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

The CPU usage is 25% for the .NET process (I have a 4 cores CPU).

I’ve generated a dump file, and it seems to be stuck somewhere in Mono.Cecil:

System.Private.CoreLib.dll!System.SpanHelpers.SequenceEqual(ref byte first, ref byte second, nuint length) Line 1561
	at /_/src/libraries/System.Private.CoreLib/src/System/SpanHelpers.Byte.cs(1561)
Mono.Cecil.dll!Mono.Cecil.MetadataResolver.GetType(Mono.Cecil.ModuleDefinition module, Mono.Cecil.TypeReference reference)
Mono.Cecil.dll!Mono.Cecil.MetadataResolver.Resolve(Mono.Cecil.MethodReference method)
Mono.Cecil.dll!Mono.Cecil.ModuleDefinition.Resolve(Mono.Cecil.MethodReference method)
Mono.Cecil.dll!Mono.Cecil.MethodReference.Resolve()
coverlet.core.dll!Coverlet.Core.Instrumentation.Reachability.ReachabilityHelper.CreateForModule(Mono.Cecil.ModuleDefinition module, string[] doesNotReturnAttributes, Coverlet.Core.Abstractions.ILogger logger) Line 299
	at /_/src/coverlet.core/Instrumentation/ReachabilityHelper.cs(299)
coverlet.core.dll!Coverlet.Core.Instrumentation.Instrumenter.CreateReachabilityHelper() Line 210
	at /_/src/coverlet.core/Instrumentation/Instrumenter.cs(210)
coverlet.core.dll!Coverlet.Core.Instrumentation.Instrumenter.InstrumentModule() Line 219
	at /_/src/coverlet.core/Instrumentation/Instrumenter.cs(219)
coverlet.core.dll!Coverlet.Core.Instrumentation.Instrumenter.Instrument() Line 159
	at /_/src/coverlet.core/Instrumentation/Instrumenter.cs(159)
coverlet.core.dll!Coverlet.Core.Coverage.PrepareModules() Line 146
	at /_/src/coverlet.core/Coverage.cs(146)
coverlet.collector.dll!Coverlet.Collector.DataCollection.CoverageWrapper.PrepareModules(Coverlet.Core.Coverage coverage) Line 63
	at /_/src/coverlet.collector/DataCollection/CoverageWrapper.cs(63)
coverlet.collector.dll!Coverlet.Collector.DataCollection.CoverageManager.InstrumentModules() Line 65
	at /_/src/coverlet.collector/DataCollection/CoverageManager.cs(65)
coverlet.collector.dll!Coverlet.Collector.DataCollection.CoverletCoverageCollector.OnSessionStart(object sender, Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection.SessionStartEventArgs sessionStartEventArgs) Line 140
	at /_/src/coverlet.collector/DataCollection/CoverletCoverageCollector.cs(140)
[Native to Managed Transition]
[Managed to Native Transition]
System.Private.CoreLib.dll!System.Delegate.DynamicInvokeImpl(object[] args) Line 89
	at /_/src/coreclr/src/System.Private.CoreLib/src/System/Delegate.CoreCLR.cs(89)
System.Private.CoreLib.dll!System.Delegate.DynamicInvoke(object[] args) Line 64
	at /_/src/libraries/System.Private.CoreLib/src/System/Delegate.cs(64)
Microsoft.TestPlatform.CoreUtilities.dll!Microsoft.VisualStudio.TestPlatform.Utilities.MulticastDelegateUtilities.SafeInvoke(System.Delegate delegates, object sender, System.EventArgs args, string traceDisplayName)
Microsoft.VisualStudio.TestPlatform.Common.dll!Microsoft.VisualStudio.TestPlatform.Common.DataCollector.TestPlatformDataCollectionEvents.OnSessionStart(Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection.DataCollectionEventArgs e)
Microsoft.VisualStudio.TestPlatform.Common.dll!Microsoft.VisualStudio.TestPlatform.Common.DataCollector.TestPlatformDataCollectionEvents.RaiseEvent(Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection.DataCollectionEventArgs e)
Microsoft.VisualStudio.TestPlatform.Common.dll!Microsoft.VisualStudio.TestPlatform.Common.DataCollector.DataCollectionManager.SendEvent(Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection.DataCollectionEventArgs args)
Microsoft.VisualStudio.TestPlatform.Common.dll!Microsoft.VisualStudio.TestPlatform.Common.DataCollector.DataCollectionManager.SessionStarted(Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection.SessionStartEventArgs sessionStartEventArgs)
Microsoft.TestPlatform.CommunicationUtilities.dll!Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.DataCollection.DataCollectionRequestHandler.HandleBeforeTestRunStart(Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Message message)
Microsoft.TestPlatform.CommunicationUtilities.dll!Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.DataCollection.DataCollectionRequestHandler.ProcessRequests()
datacollector.dll!Microsoft.VisualStudio.TestPlatform.DataCollector.DataCollectorMain.StartProcessing()
datacollector.dll!Microsoft.VisualStudio.TestPlatform.DataCollector.DataCollectorMain.Run(string[] args)
datacollector.dll!Microsoft.VisualStudio.TestPlatform.DataCollector.Program.Main(string[] args)

Environment:

  • Windows 10
  • .NET SDK 5.0.102

Repro steps:

  • git clone https://github.com/meziantou/Meziantou.Framework.git
  • cd Meziantou.Framework
  • git checkout f96e0db0ab979a7d8344ec92391a1136b19a14fe
  • dotnet build Meziantou.Framework.sln --configuration Debug /bl
  • dotnet test .\tests\Meziantou.Framework.SingleInstance.Tests\Meziantou.Framework.SingleInstance.Tests.csproj --configuration Debug --no-build --logger trx --collect:“XPlat Code Coverage” -f net461

=> This is the only project of the solution that hangs, and it works with other target frameworks (-f net5.0) => It works with coverlet 1.3.0 => It works without --collect:"XPlat Code Coverage"

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:35 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bthharpercommented, May 25, 2021

Have worked out how to debug my locally built coverlet.console tool. Now just trying to work out where it is stuck.

1reaction
RomanBadiornyicommented, Apr 23, 2021

@MarcoRossignoli, so far I have found out that it 's keep switching between resolving path of System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 and System.IO.Compression, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

I will try to create simple repro app on these weekends and will open a new issue. Thanks for quick response.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot instances with failed status checks
The following information can help you troubleshoot issues if your instance fails a status check. First determine whether your applications are exhibiting ...
Read more >
Post-upgrade actions failed - ITOM Practitioner Portal
This issue may occur in one of the following scenarios: The post-upgrade actions have been completed successfully; however, the system fails ...
Read more >
Easiest way to detect Internet connection on iOS?
AFNetworkReachabilityManager.reachable does NOT perform any sort of synchronous check. It returns a logical or of reachableViaWWAN and ...
Read more >
Addressing watchdog terminations
Identify the signature of an unresponsive app terminated by the watchdog, and address the issue.
Read more >
RPC error troubleshooting guidance - Windows Client
Learn how to troubleshoot Remote Procedure Call (RPC) errors that occur during computer-to-computer communication.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found