Status Update
Comments
ag...@google.com <ag...@google.com> #2
ASharedMemory can no longer be mapped in child progress
hu...@google.com <hu...@google.com>
wd...@google.com <wd...@google.com> #3
Device build details -- Device Make, Model, Android OS Version
Preconditions to reproduce the issue.
Please provide sample project.
Provide the bin file or apk if possible to depict it through JAVA API to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Frequency
How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
Expected output as per the apk shared.
What is the expected output?
Current output as per the apk shared.
What is the current output?
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the files to google drive and share the folder to android-bugreport@google.com, then share the link here.
wd...@google.com <wd...@google.com> #4
* Are you an Android developer?" (Y/N)
Yes
* Which Android Developer Preview build are you using? See Settings > About phone > Build number (for example RPP1.200123.000).
RPB3.200720.005
* Is this a regression from Android 10 to 11?
Yes
* What device are you using? (for example, Pixel 3 XL)
Pixel 2 API 30 emulated
* What are the steps to reproduce the problem? (Please provide the minimal reproducible test case.)
* Issue Category e.g. Framework (platform), NDK (platform), Hardware (CPU, GPU, Sensor, Camera), ART (platform), Runtime Permissions etc
NDK
* What was the expected result?
mmap in child progess success
*How frequently does this issue occur? (e.g 100% of the time, 10% of the time)
100% of the time
*Expected output as per the apk shared Relevant logcat output.
Code to reproduce the bug https://drive.google.com/file/d/1RKxloyiFUzVxniUHl_pGwB1C62hLAoKj/view?usp=sharing
Devices below android 11
E/MMap (24004): parent progess create ashmem success!! E/MMap (24004): parent progess mmap success!! E/MMap (24004): fork success on main process E/MMap (24024): fork child success E/MMap (24024): child process --child progess start!!--[/data/app/com.example.testmmap-2/lib/arm//libChild-mmap.so]--[26] E/MMap (24024): child process -- map ashmem region suceess !!! Device android 11 E MMap : parent progess create ashmem success!! E MMap : parent progess mmap success!! E MMap : fork success on main process E MMap : child progess start!!--[/data/app/~~dwoB2cD-fsG1UYLML_cKLw==/com.example.testmmap-m50nMorgvlONu3i6uNFhJw==/lib/x86//libChild-mmap.so]--[54] E MMap : child process --failed to map ashmem region: Bad file descriptor
* What was the actual result?
mmap in child progess failed
wd...@google.com <wd...@google.com> #6
Devices below android 11 E/MMap (24004): RegisterNatives--result-0 E/MMap (24004): parent progess create ashmem success!! E/MMap (24004): parent progess mmap success!! E/MMap (24004): fork success on main process E/MMap (24024): fork child success E/MMap (24024): child process --child progess start!!--[/data/app/com.example.testmmap-2/lib/arm//libChild-mmap.so]--[26] E/MMap (24024): child process -- map ashmem region suceess !!!
wd...@google.com <wd...@google.com>
wn...@google.com <wn...@google.com> #7
08-21 12:12:36.552 11097 11097 E MMap : RegisterNatives--result-0
08-21 12:12:36.554 11097 11097 E MMap : parent progess create ashmem success!!
08-21 12:12:36.554 11097 11097 E MMap : parent progess mmap success!!
08-21 12:12:36.565 11097 11097 E MMap : fork success on main process
08-21 12:12:36.573 11136 11136 E MMap : fork child success
08-21 12:12:36.608 11136 11136 E MMap : child process --child progess start!!--[/data/app/~~dwoB2cD-fsG1UYLML_cKLw==/com.example.testmmap-m50nMorgvlONu3i6uNFhJw==/lib/x86//libChild-mmap.so]--[54]
08-21 12:12:36.608 11136 11136 E MMap : child process --failed to map ashmem region: Bad file descriptor
Description
3.1 canary 8
Emulator Version (Emulator--> Extended Controls--> Emulator Version): 27.1.9-4592662
HAXM / KVM Version:
Android SDK Tools:
Host Operating System: glinux
CPU Manufacturer: [Intel / AMD / Other]
Steps to Reproduce Bug:
1. Create an x86 /w google apis kitkat image, 2gb internal storage
2. Start the emulator
3. run: adb shell df
4. Stop the emulator
5. Edit emulator settings through the studio UI: advanced -> set "Internal Storage" to 4000 mb
6. Save & start emulator
7. run: adb shell df
Expected Behavior:
Step 7 should have more space available than step 3
Observed Behavior:
They show the same df output.
In the .avd directory, I see:
-rw-r----- 1 agrieve primarygroup 2.0G Mar 16 10:45 userdata-qemu.img.qcow2
-rw-r----- 1 agrieve primarygroup 2.0G Feb 21 11:38 userdata.img
-rw------- 1 agrieve primarygroup 5.9G Mar 16 10:38 userdata-qemu.img
Note: at one point I tried setting 6000MB, so probably why there's a 6gb file (although I've since set it to 4000 again).
Seems like that is too many files? Wrong one being used?
config.ini makes no mention of "userdata"