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.

Coverage causes hangs

See original GitHub issue

Hi,

When adding coverage for .NET Framework, it’s causing hangs. It works fine on .NET Core: https://dev.azure.com/onovotny/GitBuilds/_build/results?buildId=2203&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9

This commit has the changes: https://github.com/onovotny/bc-csharp/commit/5ddb17530b4175ce31092ac671d2ed496c2ecd06

Here’s the command that fails, when on .NET Framework: https://github.com/onovotny/bc-csharp/commit/5ddb17530b4175ce31092ac671d2ed496c2ecd06

Seems like it’s happening with .NET Core too: https://dev.azure.com/onovotny/GitBuilds/_build/results?buildId=2204&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=bfbec40a-1b5e-5690-b870-859627cad0c0&l=20

Should be able to repro with dotnet test -f netcoreapp2.1 ...

Repro steps:

Clone: https://github.com/onovotny/bc-csharp Checkout commit: 4a401ed22df13ef61b2bb7a306ee8a083167f1c6 Go to crypto\test Run dotnet test -f netcoreapp2.1 and see that it passes. About 1.5 min on my machine Run dotnet test -f netcoreapp2.1 -s ..\..\CodeCoverage.runsettings

Tests are taking much longer to run (never complete) and fail in some cases.

I think it’s struggling on this test: https://github.com/onovotny/bc-csharp/blob/netstandard/crypto/test/src/math/ec/test/ECPointPerformanceTest.cs#L176

Perhaps with some of the random number generators in use there?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:23 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
jkotascommented, Aug 7, 2019

@jkotas do you think that aggressive inlining could help here(I think that tiering cannot help to remove the call)

This is small-enough method to be inlined by JIT without any hints. I do not expect that aggressive inlining would help anything here.

0reactions
MarcoRossignolicommented, Aug 8, 2019

@onovotny I did a lot of test on 2 different machine yesterday evening 4/5 time x machine, and no luck…I cannot repro, my command was

C:\git\coverletissue\bc-csharp> dotnet test .\crypto\test\crypto.test.csproj -s .\CodeCoverage.runsettings 

runsettings

<?xml version="1.0" encoding="utf-8"?>
<!-- File name extension must be .runsettings -->
<RunSettings>
  <DataCollectionRunSettings>
    <DataCollectors>      
       <DataCollector friendlyName="XPlat code coverage">
        <Configuration>
          <Format>cobertura</Format>
          <Exclude>[xunit.*]*,[*Tests]*,[nunit.*]*,[NUnit3.*]*</Exclude> <!-- [Assembly-Filter]Type-Filter -->
          <ExcludeByAttribute>Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute</ExcludeByAttribute>
          <SingleHit>true</SingleHit>
        </Configuration>
      </DataCollector>    
    </DataCollectors>
  </DataCollectionRunSettings>
</RunSettings>

Can you check that my config it’s the same as yours?

This is the instrumentation of Init() on RsaKeyPairGenerator image

I’ve one suspect for https://github.com/tonerdo/coverlet/issues/511#issuecomment-519087222 …that for some reason tests are running in parallel and two test ask for static access to https://github.com/onovotny/bc-csharp/blob/netstandard/crypto/test/src/cms/test/CMSTestUtil.cs#L84-L91 and the first init kpg so null check above return non initilized instance for another thread that could lead to null ref. Maybe could happen because instrumented code are slower than non instrumented or is no more inlined so the randomic nature of failure. Can you try to force tests serialization?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rider 2021.3.* hanging in test coverage.
Only "Cover Tests" causes the hang. Something underneath does not recover from stopping the unit test session and the IDE no longer functions...
Read more >
My diff-coverage and total-coverage statuses are hanging ...
Typically, the absence of coverage for either is caused by: A) A failed CI build of the branch head commit and/or merge base...
Read more >
Code Coverage Screen hangs in Azure Pipeline Build
Currently it builds correctly and runs the unit tests. However the code coverage tab just spins infinitely. Any idea on what would cause...
Read more >
How to Handle Freeze Damage Insurance Claims
Freeze damage is typically covered under standard water damage coverage in insurance policies. Unless there are exclusions, so carefully check ...
Read more >
Medicaid centers swamped with calls
Medicaid centers swamped with calls. U.S. warns wait times may cause those trying to renew coverage to hang up by DAVID A. LIEB...
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