Genymobile / Genymobile/scrcpy
scrpy cause android ION memory leak very quickly, but ARDC won't(594 objests in size of 7880704 , Total 4681138176)
- Dominant language
- C
- Stars
- 150k
- Forks
- 13.7k
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 2
Description
- [*] I have read the [FAQ](https://github.com/Genymobile/scrcpy/blob/master/FAQ.md).
- [*] I have searched in existing [issues](https://github.com/Genymobile/scrcpy/issues).
**Environment**
- OS: [Windows]
- scrcpy version: [e.g. v1.24]
- installation method: [Windows release...]
- device model: Qualcomm SA8295
- Android version: [12]
**Describe the bug**
size 7880704 ion_dma_buf will occupy about more than 594 times
Dma-buf Objects:
size flags mode count exp_name ino
07880704 00000002 00080007 00000005 ion_dma_buf|556|vendor.qti.medi|EvtQ_codecPipe 00298486
...
Total 976 objects, 5360279552 bytes
594 objests in size of 7880704 , Total 4681138176
although 7880704 is malloc in
vendor.qti.medi 556 mediacodec 1254r CHR 10,127 0t0 2208 /dev/ion
but it related with
main 8274 shell 46r CHR 10,127 0t0 2208 /dev/ion
and pid 8274 is scrpcy.
10-19 09:45:53.030 shell 8274 8274 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
10-19 09:45:53.029 shell 8274 8274 I app_process: type=1400 audit(0.0:4679): avc: denied { read } for name="u:object_r:odsign_prop:s0" dev="tmpfs" ino=3541 scontext=u:r:shell:s0 tcontext=u:object_r:odsign_prop:s0 tclass=file permissive=1
10-19 09:45:53.029 shell 8274 8274 I app_process: type=1400 audit(0.0:4680): avc: denied { open } for path="/dev/__properties__/u:object_r:odsign_prop:s0" dev="tmpfs" ino=3541 scontext=u:r:shell:s0 tcontext=u:object_r:odsign_prop:s0 tclass=file permissive=1
10-19 09:45:53.034 shell 8274 8274 I AndroidRuntime: Using default boot image
10-19 09:45:53.034 shell 8274 8274 I AndroidRuntime: Leaving lock profiling enabled
10-19 09:45:53.029 shell 8274 8274 I app_process: type=1400 audit(0.0:4681): avc: denied { getattr } for path="/dev/__properties__/u:object_r:odsign_prop:s0" dev="tmpfs" ino=3541 scontext=u:r:shell:s0 tcontext=u:object_r:odsign_prop:s0 tclass=file permissive=1
10-19 09:45:53.029 shell 8274 8274 I app_process: type=1400 audit(0.0:4682): avc: denied { map } for path="/dev/__properties__/u:object_r:odsign_prop:s0" dev="tmpfs" ino=3541 scontext=u:r:shell:s0 tcontext=u:object_r:odsign_prop:s0 tclass=file permissive=1
10-19 09:45:53.035 shell 8274 8274 W app_process: ART APEX data files are untrusted.
10-19 09:45:53.036 shell 8274 8274 I app_process: Core platform API reporting enabled, enforcing=false
10-19 09:45:53.102 shell 8274 8274 D app_process: Time zone APEX ICU file found: /apex/com.android.tzdata/etc/icu/icu_tzdata.dat
10-19 09:45:53.102 shell 8274 8274 D app_process: I18n APEX ICU file found: /apex/com.android.i18n/etc/icu/icudt68l.dat
10-19 09:45:53.120 shell 8274 8274 D ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
10-19 09:45:53.120 shell 8274 8274 D AndroidRuntime: Calling main entry com.genymobile.scrcpy.Server
we find it can be reproduced by open scrcpy and plug out the USB cable, at the sametime we will send some canoe messages.
but it can't reproduce by ARDC.
BRs
wangran10@xiaomi.com
Contributor guide
No contributing guide indexed for this repository
Research direction
No source file or test is identified in the report. Start by reproducing the leak on the Qualcomm SA8295 with Android 12: open scrcpy, unplug the USB cable, and send the reported canoe messages; completion would require identifying and correcting the ION dma-buf growth without regressing the disconnect path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, c
- Domain
- mobile-dev, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100