-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Memory leak of facedetectioncpu example on Android (RK3399 specific) #205
Comments
My environment similar to you, is also in ubuntu for android development, hardware environment is rk3399. Want to know if you have some problems, such as building the app, the terminal was slow, but also download third-party libraries, for example opencv4.1, etc., those things are particularly large, slow download, do you have any solution? Also, are you building a new app? As for the 0.6 version of mediapipe, some new functions have been added, such as aar module can be built, there are still many problems, I look forward to discussing with you, ok? You are here, just reply me directly, thank you |
@teleger |
@zhouy1017 @jiuqiant is doing facedetectiongpu testing on pixel 2 phone for past 2+ hours but currently it looks like there are no memory leak issues to date. We will report more once we have done cpu.
|
Hi, thanks for reporting this issue to us! To reproduce this issue, I install the MediaPipe face detection cpu and gpu demo on a Google Pixel 2 XL and utilize Android Studio profiler to monitor the memory usage of each app for 2 hours. AFAICT, I don't see any significant memory leak on the Google Pixel 2 XL. For the face detection cpu demo (in the debug mode), the memory usage of the app ranges from 380 MB to 395 MB. Here are two data points for your reference. For the face detection gpu demo, the memory footprint is between 260 MB to 275 MB. We provide two data points for your reference as well. You can build the face detection gpu demo in Android Studio by cloning this repo directly. As the next step, we probably need to get a RK3399Pro to reproduce your issue. But, it may take longer time. |
@mgyong @jiuqiant @mgyong
The memory leaks gradually. It becomes sensible after hours (crashed on a 2GB RK3288 in about 6 hours), and reaches unacceptable size after 14 hours.
Yes. After hours of testing, I could confirm this. We tested on RK3399Pro and Samsung S7e. And the result is that no memory leak on S7e while issue presists on RK3399. You can check the results below.
We plan to use RK3399 to control an automatic door based on facedetection(just open the door for human faces, no face identity needed). @jiuqiant On 3399, memory leak could be significant after 2 hours. It is confirmed that the issue is RK3399 related. |
@zhouy1017 Curious why you are using RK3399? Is this the production board? We love to get more info on your use case. Pls email me mgyong at google dot com |
@zhouy1017 @jiuqiant tested on MIUI version 10.3.2 Stable, Android version 9 PKQ1.180 Redmi Note 5. Can you retest on your Note 3 (let us know what is the version?)? Thanks |
We worked with Rockchip (the manufacturer of RK3399) and got the issue solved by upgrading the mali drivers. |
I have Memory leak of handtrackinggpu now in RK3399 X99 TV Box, and my TV Box firmware system is the latest version. |
Hello,
We received an system update from Rockchip and that fixed the issue we encountered.
I don’t know if Rockchip updates the update files listed on their website but maybe you can contact them directly to figure it out.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Ting-Yu Lin <[email protected]>
Sent: Thursday, March 26, 2020 1:47:53 PM
To: google/mediapipe <[email protected]>
Cc: zhouy1017 <[email protected]>; Mention <[email protected]>
Subject: Re: [google/mediapipe] Memory leak of facedetectioncpu example on Android (RK3399 specific) (#205)
We worked with Rockchip (the manufacturer of RK3399) and got the issue solved by upgrading the mali drivers.
I have Memory leak of handtrackinggpu now in RK3399 X99 TV Box, and my TV Box firmware system is the latest version.
How Can I solve this problem?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgoogle%2Fmediapipe%2Fissues%2F205%23issuecomment-604242560&data=02%7C01%7C%7C07e80d4a6b0b4483c35c08d7d1493b62%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637207984760125304&sdata=mcMrjYeniaWekLfvKlKS4KAL2kDv7tR3CjFM%2FYM1hn0%3D&reserved=0>, or unsubscribe<https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAE25QT6AIJJ4B5KBOBHBRKDRJLUATANCNFSM4JGSCT2A&data=02%7C01%7C%7C07e80d4a6b0b4483c35c08d7d1493b62%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637207984760125304&sdata=6WvMaQukq1F5yiwxEK9rxqJRAVhFbIzt1QHfz83Ji3Y%3D&reserved=0>.
|
能否把补丁私信我一份 [email protected] |
I found that there is some problem with rk3399's "GLES20.glDeleteTextures" , it doesn't work well,and will cause memory leak problem. So, I created a texture pool to avoid calling GLES20.glGenTextures ererytime. |
@lovehuanhuan Could you please provide code example for the change you made? I would be very thanked if you do, thanks |
Initial import of customization notebooks
Hello,
We noticed a crash issue of facedetectioncpu example Android app directly built from repo after running hours on a 2G RAM platform.
We tested and monitored the memory usage of the application for over 12 hours on another device with 4G RAM and get a record of unusual growing memory usage.
The memory usage at the first minutes after application booted:
USER PID PPID VSZ RSS WCHAN ADDR S NAME
u0_a83 1963 399 5623744 463512 0 0 S com.google.mediapipe.apps.facedetectioncpu
USER PID PPID VSZ RSS WCHAN ADDR S NAME
u0_a83 1963 399 5623744 462452 0 0 S com.google.mediapipe.apps.facedetectioncpu
The memory usage after about 14 hours running:
USER PID PPID VSZ RSS WCHAN ADDR S NAME
u0_a83 1963 399 14258664 2922496 0 0 S com.google.mediapipe.apps.facedetectioncpu
USER PID PPID VSZ RSS WCHAN ADDR S NAME
u0_a83 1963 399 14430984 2925108 0 0 S com.google.mediapipe.apps.facedetectioncpu
(And we have the log by 30s interval indicating the growth by time).
We suspect there are some memory related issues in the application.
Here is our environment information:
Build OS: Ubuntu 18.04.3
Bazel Version: 0.29.1
Repo commit:c6fea4c9d9f3bdf081c10387d2b42ed854199d06
Testing Device: RK3399Pro
Android: 8.1.0 Kernel 4.4.167
The text was updated successfully, but these errors were encountered: