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

Fix fastdev library side loading #3927

Merged
merged 3 commits into from
Nov 21, 2019
Merged

Conversation

grendello
Copy link
Contributor

Override directories must be set up both in the debug app helper and the
monodroid runtime as both of them are loaded separately and they do not depend
on each other. This fixes loading of the side loaded shared libraries from the
internal location where they are copied from the override directories.

@grendello grendello added the full-mono-integration-build For PRs; run a full build (~6-10h for mono bumps), not the faster PR subset (~2h for mono bumps) label Nov 18, 2019
@grendello grendello force-pushed the fix-fastdev branch 6 times, most recently from 6b78b0a to ba58934 Compare November 18, 2019 21:21
@grendello
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@grendello
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@grendello grendello force-pushed the fix-fastdev branch 2 times, most recently from 2a5f0ad to c8b1e6e Compare November 20, 2019 07:32
Override directories must be set up both in the debug app helper and the
monodroid runtime as both of them are loaded separately and they do not depend
on each other. This fixes loading of the side loaded shared libraries from the
internal location where they are copied from the override directories.

Add a pipeline step to run tests with fast dev enabled
@dellis1972
Copy link
Contributor

So the Mac error is
error ANDKT0000: keytool error: java.io.EOFException

interestingly there is a warning further up

message ANDKT0000: Warning: The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format

Which is new. I wonder if this Microsoft version of java has been hardened for FIPS like we had too, or has had something else done to it.

@jonpryor
Copy link
Member

I've been seeing that ANDKT0000 error a lot of late. I'd love to know why.


for (uint32_t i = 0; i < BasicAndroidSystem::MAX_OVERRIDES; ++i) {
const char *p = androidSystem.get_override_dir (i);
if (!utils.directory_exists (p))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is slightly concerning, in that it's imaginable that externalStorageDirs may be null at some point -- especially when we're looking into shared runtime removal/etc. -- in which case it's imaginable that p will be nullptr here, which would (eventually) result in stat(nullptr, &buf), which is....probably "fine"? But not desirable?

Check if override directory is null before passing it to `stat`
@jonpryor jonpryor merged commit 6dbf4d4 into dotnet:master Nov 21, 2019
@grendello grendello deleted the fix-fastdev branch November 21, 2019 21:34
jonpryor pushed a commit that referenced this pull request Nov 27, 2019
Override directories must be set up in both
`libxamarin-debug-app-helper.so` and `libmonodroid.so`, as both of
them are loaded separately and they do not depend on each other.

This fixes loading of the side loaded shared libraries from the
internal location where they are copied from the override directories.

Add a pipeline step to run tests with `$(AndroidFastDeploymentType)`
set to `Assemblies:Dexes`, which should side-load native libs.
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
full-mono-integration-build For PRs; run a full build (~6-10h for mono bumps), not the faster PR subset (~2h for mono bumps)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants