-
Notifications
You must be signed in to change notification settings - Fork 54
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
Failure in Windows build in master #1104
Comments
@ronaldtse Looks like it's something with GHA (see comment rnpgp/ruby-rnp#67 (comment)). |
Got it, thanks! Will look out for the fix to come... |
This is the latest failure: https://github.com/rnpgp/rnp/actions/runs/91859235
|
Okay, it seems I reproduced this hang locally. Will take a look... |
That's good news, maybe we don't have to wait for it to resolve itself after all. I wonder if it's hanging reading from a pipe or something. It's odd we haven't really changed anything though. |
@dewyatt I think it could be something updated in ctest or google test. MinGW uses latest ones (and it's a pain to use older versions, since those are not always available). Will investigate further. |
Update: I tried to downgrade MinGW packages without luck. Ended up attaching lldb to the hanged process, giving no callstack and hang in WaitForMultipleObjects(). So I think it is something in MinGW/MSYS core (search give some comparable problem in summer 2019). |
So I tried having a go at this too. I can see rnp.exe and rnpkeys.exe both hang after
I'm not sure if it's a bug in winpthread's C++11 impl, or in botan's thread pool, or with our configuration. I think some workarounds would be:
I also found at least one unrelated windows-specific bug, I'll do a PR for that next week. @ni4 Are your findings looking similar? |
@dewyatt Thanks for your investigations. Actually I didn't suspect Botan update as a possible source of problems. Actually I was unable to get back to the case where things work well, so will try it tomorrow. |
@dewyatt I tracked down Botan to the minimalistic test which hangs when run alone: TEST_F(rnp_tests, test_botan_hang_rsa)
{
botan_rng_t rng = NULL;
assert_int_equal(botan_rng_init(&rng, NULL), 0);
botan_privkey_t rsa_key = NULL;
assert_int_equal(botan_privkey_create(&rsa_key, "RSA", "1024", rng), 0);
/* call below hangs the test if run with '1' as third parameter */
assert_int_equal(botan_privkey_check_key(rsa_key, rng, 1), 0);
botan_privkey_destroy(rsa_key);
botan_rng_destroy(rng);
} Internally it uses PK_Signer/PK_Verifier to test whether key is able to sign, and most likely this is the source of hangs (signing with RSA hangs as well). Since now I need to focus on other things, what about to downgrade Botan in CI to the 2.13, and later get back to this (probably, creating issue in Botan's GitHub)? |
@ni4 Confirmed, that makes sense since the thread pool is utilized in
Sure we should be able to do that. I'll do a PR today.
I did some brief testing and wasn't able to reproduce the hang with your minimal test when building with MSVC (with threads enabled), only with mingw-w64+winpthreads. So I lean towards it not being a bug in botan itself, but still maybe botan's |
To save it for later - I think this line from Botan's release notes introduced the hang: |
Right that's the commit I linked to earlier - randombit/botan@d1318e6 |
@dewyatt wow, somehow mislooked that, sorry, my fault. |
Closing this since it was fixed via #1371 and msys2/MINGW-packages#7640 |
Description
In the master build the Windows build seems to fail by timeout; i.e.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: