Closed draptik closed 6 months ago
You should have some logs from vstest in the Stryker outputs folder
My original post contains the complete log (StrykerOutput/<timestamp>/logs/log-<timestamp>.txt
). Or am I missing something obvious?
@draptik there should be additional logs in that folder for vstest. If they're not there that means vstest simply failed to start at all on your system.
@rouke-broersma Ah, thanks for the pointer.
The nested logs
folder contains no additional infos:
❯ pwd
/home/patrick/projects/dotnet-stryker-demos/Demo/StrykerOutput/2023-12-15.13-28-54/logs/StrykerOutput/2023-12-15.13-37-56/logs
…/StrykerOutput/2023-12-15.13-37-56/logs
❯ le
.rw-r--r-- 83 patrick patrick 15 Dec 13:37 log-20231215.txt
…/StrykerOutput/2023-12-15.13-37-56/logs
❯ cat log-20231215.txt
2023-12-15T13:37:56.8492734+01:00 [INF] Logging enabled at level Trace (8a18af78)
Anything else I can check?
Here is some information on vstest.console debugging: https://github.com/microsoft/vstest/blob/main/docs/diagnose.md
log.host.23-12-15_16-26-15_66126_5.txt log.txt
@rouke-broersma thanks! I've attached the output of running dotnet test --diag:log.txt
.
Does this provide any useful infos?
We don't use the vstest.console that comes with dotnet cli, we provide our own version to ensure compatibility with Stryker. It should be unpacked in your temp folder (/tmp/qq2p0e22.3ys/.vstest/tools/netcoreapp3.1/vstest.console.dll)
Just to be on the safe side I reinstalled stryker.
When trying to run the vstest.console provided by stryker I end up with a libssl error message: No usable version of libssl was found
:
dotnet /tmp/2dic4trl.ah0/.vstest/tools/netcoreapp3.1/vstest.console.dll DemoTests/DemoTests.dll --diag:log.txt
Microsoft (R) Test Execution Command Line Tool Version 17.8.0 (x64)
Copyright (c) Microsoft Corporation. All rights reserved.
No usable version of libssl was found
[1] 224387 IOT instruction (core dumped) dotnet /tmp/2dic4trl.ah0/.vstest/tools/netcoreapp3.1/vstest.console.dll
Is there anything else I can try?
Just to be on the safe side I reinstalled stryker. When trying to run the vstest.console provided by stryker I end up with a libssl error message:
No usable version of libssl was found
:dotnet /tmp/2dic4trl.ah0/.vstest/tools/netcoreapp3.1/vstest.console.dll DemoTests/DemoTests.dll --diag:log.txt Microsoft (R) Test Execution Command Line Tool Version 17.8.0 (x64) Copyright (c) Microsoft Corporation. All rights reserved. No usable version of libssl was found [1] 224387 IOT instruction (core dumped) dotnet /tmp/2dic4trl.ah0/.vstest/tools/netcoreapp3.1/vstest.console.dll
Is there anything else I can try?
I just noticed you're running on arch. Are you using dotnet straight from Microsoft or are you using it through a distro specific repo? Could be some modifications were made for it to run properly on arch which we don't have since we use the Microsoft provided generic version.
Yes, I'm using the arch package for dotnet: https://archlinux.org/packages/extra/x86_64/dotnet-sdk/
Looking inside the PKGBUILD
file (https://gitlab.archlinux.org/archlinux/packaging/packages/dotnet-core/-/blob/main/PKGBUILD?ref_type=heads) I can't spot anything unusual.
Maybe netcore3 uses an outdated version of libssl?
❯ le /usr/lib/libssl*
lrwxrwxrwx 651k root root 24 Oct 16:55 /usr/lib/libssl.so -> libssl.so.3
.rwxr-xr-x 651k root root 24 Oct 16:55 /usr/lib/libssl.so.3
.rwxr-xr-x 424k root root 20 Nov 22:23 /usr/lib/libssl3.so
Maybe netcore3 uses an outdated version of libssl?
❯ le /usr/lib/libssl* lrwxrwxrwx 651k root root 24 Oct 16:55 /usr/lib/libssl.so -> libssl.so.3 .rwxr-xr-x 651k root root 24 Oct 16:55 /usr/lib/libssl.so.3 .rwxr-xr-x 424k root root 20 Nov 22:23 /usr/lib/libssl3.so
Vstest console is a dotnet dll so I would assume libssl isn't included in it but I don't know. I don't really know enough about vstest architecture nor how Linux package management works to understand how this would work exactly.
Maybe netcore3 uses an outdated version of libssl?
❯ le /usr/lib/libssl* lrwxrwxrwx 651k root root 24 Oct 16:55 /usr/lib/libssl.so -> libssl.so.3 .rwxr-xr-x 651k root root 24 Oct 16:55 /usr/lib/libssl.so.3 .rwxr-xr-x 424k root root 20 Nov 22:23 /usr/lib/libssl3.so
Vstest console is a dotnet dll so I would assume libssl isn't included in it but I don't know. I don't really know enough about vstest architecture nor how Linux package management works to understand how this would work exactly.
I know from past versions of dotnet core that openssl with linux is a common pain point. If I remember correctly, older versions of dotnet core relied on hardcoded, outdated openssl implementations.
Maybe someone else can help?
@rouke-broersma Looking into old issues like https://github.com/dotnet/core/issues/4749 I wouldn't hold my breath on a fix for dotnetcore3.
According to
https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core
dotnetcore3.1 had end-of-life support a year ago.
Should I open a new issue for this?
@rouke-broersma Looking into old issues like https://github.com/dotnet/core/issues/4749 I wouldn't hold my breath on a fix for dotnetcore3.
According to
https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core
dotnetcore3.1 had end-of-life support a year ago.
Should I open a new issue for this?
![]()
Vstest (latest) is shipped by Microsoft in this way so I would suggest opening a ticket in the vstest repo and ask them why this happens with the vstest portable package and not with the version shipped with dotnet cli.
I found a solution.
yay -S openssl1.1
). This does not change the default openssl
(currently 3.2). It does not require any linking of files!CLR_OPENSSL_VERSION_OVERRIDE=1.1
.Summary:
# Install openssl-1.1
yay -S openssl1.1 # one-time install
# Set environment variable
export CLR_OPENSSL_VERSION_OVERRIDE=1.1 # has to be set before running stryker
Then run stryker:
dotnet stryker ...
My alias:
alias stryker='export CLR_OPENSSL_VERSION_OVERRIDE=1.1 && dotnet stryker'
Proof of concept:
Resources:
Maybe it's worth mentioning in the docs? Or even adding a simple check along the lines "If openssl3 is the default, add the environment variable. If that also fails, crash as before with the suggestion to also install openssl1 side-by-side to openssl3"?
Yes it would be great to add a known issues docs page with these instructions, thanks for investigating!
Or even adding a simple check along the lines "If openssl3 is the default, add the environment variable. If that also fails, crash as before with the suggestion to also install openssl1 side-by-side to openssl3"?
I feel that this would be too infringing on the user's system, they might not realize or want this behavior.
Describe the bug Running
dotnet stryker
fails with error messageprocess failed to connect to vstest.console
.Logs Logs after running the command
dotnet stryker --verbosity trace --log-to-file
from the same folder as thesln
file.Expected behavior Expecting stryker to do its magic.
Desktop (please complete the following information):
Can I provide additional information?