Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Running tests #443

Open
sfhacker opened this issue Apr 7, 2023 · 9 comments
Open

[Windows] Running tests #443

sfhacker opened this issue Apr 7, 2023 · 9 comments

Comments

@sfhacker
Copy link

sfhacker commented Apr 7, 2023

Hi.

We are new to this project and have just built master branch from source on Windows 10 x64.
While running tests one of them is failing. No idea how to debug/troubleshoot this issue. Any pointers would be greatly appreciated.
Cheers.

image

All other tests are ok. For example:

image

image

@beldmit
Copy link
Contributor

beldmit commented Apr 7, 2023

Do I correctly understand that you use Linux subsystem on Windows? Which OpenSSL version do you use? Could you please provide a stack trace of the segfault?

@sfhacker
Copy link
Author

sfhacker commented Apr 7, 2023

Thanks for your prompt response (and in English language!).
No Linux subsystem, thank you very much!

image

We have already provided a stack trace.

Thanks again.

@beldmit
Copy link
Contributor

beldmit commented Apr 7, 2023

evp_cipher_init_internal (where the SEGFAULT happens) is internal OpenSSL function. So the problem look to be present in OpenSSL (or in the engine tests). I kindly ask you to build OpenSSL (and gost engine/provider) with debug info to get more information from the stack trace.

The upstream behaviour was recently fixed by openssl/openssl#20662, could you please check that you have this fix in your build tree? If it is present and the issue is still reproducible, I'd recommend raise it against OpenSSL.

@sfhacker
Copy link
Author

sfhacker commented Apr 7, 2023

Pardon my ignorance, but what is the difference between an engine and a provider? Why do we need both at the same time?
That bizarre thing seems to cause more problems than benefits (see, for instance, #18487).

We will continue debugging/troubleshooting further and report here.

Cheers.

@beldmit
Copy link
Contributor

beldmit commented Apr 7, 2023

Well. There was an engine I have been maintaining for ages and now there is also a provider which unfortunately isn't as capable as engine was because I don't have enough capacity now

@sfhacker
Copy link
Author

sfhacker commented Apr 8, 2023

If, for whatever reason, BOTH the engine and the provider are enabled (or active), a segmentation fault is thrown! (See here).
Is it possible to refactor the code and 'merge' (or conflate) both into one?
The 'gost_prov.c' file is using/calling code from 'eng_prov.c' file. Even though it is/tries to be a wrapper, it smells!.
If ONLY the provider is enabled, then almost all tests fail. The test files in this repo (e.g. test_digest, etc), are they engine tests only?

You failed to answer/explain the question/difference between them. Anyway, that's ok.

Regarding the failing test posted here, I have built OpenSSL master branch from source 'in debug mode' and this the backtrace:

image

We know nothing about this project as to understand what is going on here! It looks like Russian language!
Any ideas/hints how I can further troubleshoot this issue?

Thanks in advance.

@beldmit
Copy link
Contributor

beldmit commented Apr 8, 2023

Currently you don't have any reasons to use GOST engine and provider together. The engine is enough.

In future there are chances that someone (probably me) will rewrite it to provider model completely. Patches are strongly welcome.

@sfhacker
Copy link
Author

sfhacker commented Apr 9, 2023

More testing (and gratis!) ...

  • test_sign

image

Any ideas?

By the way, which version number is master branch at? 1.0? 3.0.4-dev?

@beldmit
Copy link
Contributor

beldmit commented Apr 9, 2023

No ideas. What do you use, engine or provider? Looks like it tries to go the provider way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants