-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix Android crypto asserts #61827
Fix Android crypto asserts #61827
Conversation
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks Issue DetailsThis fixes three asserts that were started occurring in the native Android cryptographic primitives.
/cc @AaronRobinsonMSFT.
|
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsThis fixes three asserts that were started occurring in the native Android cryptographic primitives.
/cc @AaronRobinsonMSFT.
|
@vcsjones thanks for your help, let me run some additional CI lanes to verify the fix |
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
Note, I saw a number of failures in System.Security.Cryptography on Android, most of them because it seems to be trying to load openssl or run RC2 tests. However none of the tests are tripping an assert now. |
Why would it pick the wrong |
I'm guessing this happened when
Let me see if I can fix that up. But I would not hold this PR for that. This PR is at least some progress (assuming I did it correctly 😄) |
runtime/src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj Lines 276 to 291 in 6d9edd4
Looks good, ja? Well, the properties section doesn't defined UseAndroidCrypto. My bad. |
That fixed the crypto initialization issues. Tests are still failing because it's trying to run the RC2 tests. I will fix that one next. |
And now the RC2 tests are fixed, so this is green locally for me. I would appreciate if someone could start the relevant pipelines in CI. (Previously, the RC2 one-shot tests were being excluded by csproj. They aren't anymore, so they are marked conditional as the other RC2 tests are). |
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
@bartonjs what do y'all think about having Android tests run automatically if anything changes in |
SGTM, (even if it increases the CI duration for crypto-affecting PRs) but I don't know how any of that works. What do you think, @steveisok? (Clearly it didn't occur to me that Android tests weren't run when I made the consolidation) |
We're going to try and get there as part of #61017. By default, only System.Runtime tests will execute on PR's for mobile legs. I think detecting the libraries you change and only run them is a good middle ground. |
Same, I've broken the Android build a couple of times now: #59812, #59818, #55699, etc.
Even if we run all Android tests for changes in S.S.Cryptography, I think that is an improvement over the current situation. Ideally yes, only run tests for changed projects, but the nature of S.S.Cryptography is "giant abstraction of p/invoke" so there is a fairly high chance that changes here have an impact on Android's CI. |
Good point. Running them all the time again is something to consider. BTW - the tests look good. The emulators are red because they sometimes fail S.S.Cryptography tests due to running out of memory. Many attempts were made to figure out why, none have solved the problem thus far. |
@steveisok I think you're saying it's good to merge even with the failures that are presented; but I'm not sure enough that I'm willing to push the button.
doesn't look happy to me... but if that's the OOM failure you mentioned, then OK. (As of this message, at least, all checks have completed. The Browser/wasm failure looks like some piece of infra failed after some tests, so it's only the |
In the adb logs, you'll see a bunch of these before the test activity crashes:
The failures in the other legs are known issues. I think this is good to go. Especially given the crypto tests pass on android devices (arm/arm64 legs). |
Thanks for looking into this. JFR - There are other OOM-related issue, e.g. #55691. so it's not specific for this PR. Since the initial issue seems to be addressed, it would be good to merge this change. |
Merging it as it will help to clean up the failures on android lanes. |
This fixes three asserts that were started occurring in the native Android cryptographic primitives.
/cc @AaronRobinsonMSFT.
Closes #61783