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

Support of 16KB page sizes #5728

Open
mimai-hen opened this issue Nov 14, 2024 · 2 comments
Open

Support of 16KB page sizes #5728

mimai-hen opened this issue Nov 14, 2024 · 2 comments
Assignees
Labels
platform:android Issues with Android as Platform stat:awaiting googler Waiting for Google Engineer's Response task::all All tasks of MediaPipe type:feature Enhancement in the New Functionality or Request for a New Solution

Comments

@mimai-hen
Copy link

Android 15 will now offer support for 16KB page size. Then, all shared libraries shipped within Android apps must be recompiled to support 16KB page size. See documentation :

https://developer.android.com/guide/practices/page-sizes
https://source.android.com/docs/core/architecture/16kb-page-size/16kb

I've checked ELF alignment of shared libraries in my project, and result shows that libmediapipe_tasks_vision_jni.so is not aligned :
lib/arm64-v8a/libmediapipe_tasks_vision_jni.so: \e[31mUNALIGNED\e[0m (2**12)

This issue is to ask support for Android 16KB page size in mediapipe lib. Thanks

@mimai-hen mimai-hen added the type:others issues not falling in bug, perfromance, support, build and install or feature label Nov 14, 2024
@kuaashish kuaashish added the platform:android Issues with Android as Platform label Nov 15, 2024
@kuaashish
Copy link
Collaborator

Hi @mimai-hen,

Could you please provide more details about your query regarding support for 16KB pages? We are having difficulties to understand it clearly.

Thank you!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Nov 15, 2024
@mimai-hen
Copy link
Author

Hi,

I’ll try to explain. In my Android project I use mediapipe task vision com.google.mediapipe:tasks-vision:0.10.18 for face detection.

When I launch my application on an Android 15 (with 16KB page size) emulator, it crashes when I try using face detection feature :

13:05:37.591 A Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x767d224a47f0 in tid 3371 (xxx.pro.debug), pid 3371 (frica.pro.debug)
13:05:38.007 A pid: 3371, tid: 3371, name: frica.pro.debug >>> xxx.pro.debug <<<
13:05:38.007 A #00 pc 0000000000bc47f0 /data/app/~~L48Lg1SFS4Btj8M5vE4IXw==/xxx.pro.debug-yimG5q0h5w9HtxLEz7xbSw==/lib/arm64/libmediapipe_tasks_vision_jni.so (BuildId: bca8e7908753794146dd5fbd3c1ea403)
13:05:38.007 A #1 pc 0000000000bbee84 /data/app/~~L48Lg1SFS4Btj8M5vE4IXw==/com.orange.money.africa.pro.debug-yimG5q0h5w9HtxLEz7xbSw==/lib/arm64/libmediapipe_tasks_vision_jni.so (BuildId: bca8e7908753794146dd5fbd3c1ea403)

When I launch my application on an Android 15 (with standard 4KB page size) face detection works fine, as well as previous android versions.

In order to make it work on Android 15 (with 16KB page size), some adaptations must be made to native shared libs (here libmediapipe_tasks_vision_jni.so)

Please read carefully android developers guidelines about 16KB memory page size support : https://developer.android.com/guide/practices/page-sizes?hl=en

I apologize if it’s not the right place to ask for this issue to be fixed (in that case, may be you can let me know where I should post this issue)

I hope it’s more clear. Kind regards,

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Nov 15, 2024
@kuaashish kuaashish added task::all All tasks of MediaPipe type:feature Enhancement in the New Functionality or Request for a New Solution and removed type:others issues not falling in bug, perfromance, support, build and install or feature labels Nov 20, 2024
@kuaashish kuaashish added the stat:awaiting googler Waiting for Google Engineer's Response label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:android Issues with Android as Platform stat:awaiting googler Waiting for Google Engineer's Response task::all All tasks of MediaPipe type:feature Enhancement in the New Functionality or Request for a New Solution
Projects
None yet
Development

No branches or pull requests

3 participants