Coverage causes hangs
See original GitHub issueHi,
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:
- Created 4 years ago
- Comments:23 (11 by maintainers)
Top GitHub Comments
This is small-enough method to be inlined by JIT without any hints. I do not expect that aggressive inlining would help anything here.
@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
runsettings
Can you check that my config it’s the same as yours?
This is the instrumentation of
Init()
onRsaKeyPairGenerator
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?