-
Notifications
You must be signed in to change notification settings - Fork 29
chore: upload native debug symbol #1029
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
Conversation
- Bump Firebase BoM to 34.0.0 - Add Crashlytics and Crashlytics NDK dependencies - Upgrade Android Gradle plugin to 8.1.4 - Update Google Services and Crashlytics plugin versions
This change enables the `nativeSymbolUploadEnabled` flag in `build.gradle` when `FIREBASE_CRASHLYTICS_ENABLED` is true. This allows Firebase Crashlytics to process native crash reports and provide more detailed information for debugging.
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
The Gradle distribution URL has been updated from `gradle-7.6.3-all.zip` to `gradle-8.2-all.zip` in `flutter/android/gradle/wrapper/gradle-wrapper.properties`. Additionally: - The namespace for the Android application has been set to "org.mlcommons.android.mlperfbench" in `flutter/android/app/build.gradle`. - A `subprojects` block has been added to `flutter/android/build.gradle` to set the namespace for subprojects if it's not already defined. - The `android.bundle.enableUncompressedNativeLibs=false` line has been removed from `flutter/android/gradle.properties`.
…potential issues with native libraries.
cb92ae4 to
7358a6a
Compare
Configure `assembleRelease` and `bundleRelease` tasks in build.gradle to finalize with `uploadCrashlyticsSymbolFileRelease` when `FIREBASE_CRASHLYTICS_ENABLED` is set to true.
e342c83 to
a1d04df
Compare
62ac9ff to
e640b49
Compare
|
The build 513 is released for internal testing. To install this app version, visit the link on an Android device:
|
|
@anhappdev I don't have access to the aab file, could you please help? |
@farook-edev If you mean the Play Store internal test, please check your email. I've sent you an invite. Alternatively, you can download the generated AAB file from the CI following this guide: |
|
This is the debug symbols attached in the AAB: |
|
@farook-edev it seems debug symbols are not there. @freedomtan to check these symbol files. |
|
Android documentation has some information about debug symbols. The full one in it is supposed to have DWARF information I mentioned. In the .aab,
So, I guess @farook-edev could be right that those information are stripped. |
|
Okay, I understand. There are two problems:
This PR has already addressed the second issue. I'll work on the first issue next. |
|
|
The new build android-aab-unified-516 now includes the symbol table. ➜ ll 2025-07-29_mlperfbench-qsmgt-516/BUNDLE-METADATA/com.android.tools.build.debugsymbols/arm64-v8a
total 73648
-rw-r--r--@ 1 anh staff 7.9M Jan 1 1981 libbackendbridge.so.sym
-rw-r--r--@ 1 anh staff 1.4M Jan 1 1981 libc++_shared.so.sym
-rw-r--r--@ 1 anh staff 6.0K Jan 1 1981 libcrashlytics-trampoline.so.sym
-rw-r--r--@ 1 anh staff 3.7M Jan 1 1981 libopencv_core.so.sym
-rw-r--r--@ 1 anh staff 3.1M Jan 1 1981 libopencv_imgcodecs.so.sym
-rw-r--r--@ 1 anh staff 4.0M Jan 1 1981 libopencv_imgproc.so.sym
-rw-r--r--@ 1 anh staff 45K Jan 1 1981 libsamsungbackend.so.sym
-rw-r--r--@ 1 anh staff 614K Jan 1 1981 libStableDiffusion.so.sym
-rw-r--r--@ 1 anh staff 5.0M Jan 1 1981 libtflitebackend.so.sym
-rw-r--r--@ 1 anh staff 5.1M Jan 1 1981 libtfliteneuronbackend.so.sym
-rw-r--r--@ 1 anh staff 5.0M Jan 1 1981 libtflitepixelbackend.so.symTo obtain full debug symbols, I would need to build in DEBUG mode, resulting in an AAB file size of approximately 314 MB. |
|
Hi, I just checked the readelf -S libtflitebackend.so
There are 29 section headers, starting at offset 0x50a180:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .note.androi[...] NOTE 0000000000000238 00000238
0000000000000098 0000000000000000 A 0 0 4
[ 2] .note.gnu.bu[...] NOTE 00000000000002d0 000002d0
0000000000000020 0000000000000000 A 0 0 4
[ 3] .dynsym DYNSYM 00000000000002f0 000002f0
0000000000001920 0000000000000018 A 8 1 8
[ 4] .gnu.version VERSYM 0000000000001c10 00001c10
0000000000000218 0000000000000002 A 3 0 2
[ 5] .gnu.version_d VERDEF 0000000000001e28 00001e28
0000000000000038 0000000000000000 A 8 2 4
[ 6] .gnu.version_r VERNEED 0000000000001e60 00001e60
0000000000000090 0000000000000000 A 8 4 4
[ 7] .gnu.hash GNU_HASH 0000000000001ef0 00001ef0
0000000000000088 0000000000000000 A 3 0 8
[ 8] .dynstr STRTAB 0000000000001f78 00001f78
0000000000000e3c 0000000000000000 A 0 0 1
[ 9] .rela.dyn RELA 0000000000002db8 00002db8
0000000000037398 0000000000000018 A 3 0 8
[10] .rela.plt RELA 000000000003a150 0003a150
00000000000013b0 0000000000000018 AI 3 24 8
[11] .rodata PROGBITS 000000000003b500 0003b500
000000000005855c 0000000000000000 AMS 0 0 16
[12] protodesc_cold PROGBITS 0000000000093a5c 00093a5c
0000000000003e5c 0000000000000000 A 0 0 4
[13] .gcc_except_table PROGBITS 00000000000978b8 000978b8
000000000000332c 0000000000000000 A 0 0 4
[14] .eh_frame_hdr PROGBITS 000000000009abe4 0009abe4
000000000001bb14 0000000000000000 A 0 0 4
[15] .eh_frame PROGBITS 00000000000b66f8 000b66f8
000000000006c1ac 0000000000000000 A 0 0 8
[16] .text PROGBITS 00000000001228c0 001228c0
00000000003ce374 0000000000000000 AX 0 0 32
[17] malloc_hook PROGBITS 00000000004f0c34 004f0c34
0000000000000110 0000000000000000 AX 0 0 2
[18] .plt PROGBITS 00000000004f0d50 004f0d50
0000000000000d40 0000000000000000 AX 0 0 16
[19] .data.rel.ro PROGBITS 00000000004f2000 004f2000
0000000000010558 0000000000000000 WA 0 0 8
[20] .fini_array FINI_ARRAY 0000000000502558 00502558
0000000000000010 0000000000000000 WA 0 0 8
[21] .init_array INIT_ARRAY 0000000000502568 00502568
0000000000000108 0000000000000000 WA 0 0 8
[22] .dynamic DYNAMIC 0000000000502670 00502670
0000000000000210 0000000000000010 WA 8 0 8
[23] .got PROGBITS 0000000000502880 00502880
0000000000002328 0000000000000000 WA 0 0 8
[24] .got.plt PROGBITS 0000000000504ba8 00504ba8
00000000000006a8 0000000000000000 WA 0 0 8
[25] .data PROGBITS 0000000000506250 00505250
0000000000004d50 0000000000000000 WA 0 0 8
[26] .bss NOBITS 000000000050afc0 00509fa0
000000000000ac30 0000000000000000 WA 0 0 64
[27] .comment PROGBITS 0000000000000000 00509fa0
00000000000000b2 0000000000000001 MS 0 0 1
[28] .shstrtab STRTAB 0000000000000000 0050a052
000000000000012e 0000000000000000 0 0 1readelf -S libtflitebackend.so.sym
There are 29 section headers, starting at offset 0x50a180:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .note.androi[...] NOTE 0000000000000238 00000238
0000000000000098 0000000000000000 A 0 0 4
[ 2] .note.gnu.bu[...] NOTE 00000000000002d0 000002d0
0000000000000020 0000000000000000 A 0 0 4
[ 3] .dynsym DYNSYM 00000000000002f0 000002f0
0000000000001920 0000000000000018 A 8 1 8
[ 4] .gnu.version VERSYM 0000000000001c10 00001c10
0000000000000218 0000000000000002 A 3 0 2
[ 5] .gnu.version_d VERDEF 0000000000001e28 00001e28
0000000000000038 0000000000000000 A 8 2 4
[ 6] .gnu.version_r VERNEED 0000000000001e60 00001e60
0000000000000090 0000000000000000 A 8 4 4
[ 7] .gnu.hash GNU_HASH 0000000000001ef0 00001ef0
0000000000000088 0000000000000000 A 3 0 8
[ 8] .dynstr STRTAB 0000000000001f78 00001f78
0000000000000e3c 0000000000000000 A 0 0 1
[ 9] .rela.dyn RELA 0000000000002db8 00002db8
0000000000037398 0000000000000018 A 3 0 8
[10] .rela.plt RELA 000000000003a150 0003a150
00000000000013b0 0000000000000018 AI 3 24 8
[11] .rodata PROGBITS 000000000003b500 0003b500
000000000005855c 0000000000000000 AMS 0 0 16
[12] protodesc_cold PROGBITS 0000000000093a5c 00093a5c
0000000000003e5c 0000000000000000 A 0 0 4
[13] .gcc_except_table PROGBITS 00000000000978b8 000978b8
000000000000332c 0000000000000000 A 0 0 4
[14] .eh_frame_hdr PROGBITS 000000000009abe4 0009abe4
000000000001bb14 0000000000000000 A 0 0 4
[15] .eh_frame PROGBITS 00000000000b66f8 000b66f8
000000000006c1ac 0000000000000000 A 0 0 8
[16] .text PROGBITS 00000000001228c0 001228c0
00000000003ce374 0000000000000000 AX 0 0 32
[17] malloc_hook PROGBITS 00000000004f0c34 004f0c34
0000000000000110 0000000000000000 AX 0 0 2
[18] .plt PROGBITS 00000000004f0d50 004f0d50
0000000000000d40 0000000000000000 AX 0 0 16
[19] .data.rel.ro PROGBITS 00000000004f2000 004f2000
0000000000010558 0000000000000000 WA 0 0 8
[20] .fini_array FINI_ARRAY 0000000000502558 00502558
0000000000000010 0000000000000000 WA 0 0 8
[21] .init_array INIT_ARRAY 0000000000502568 00502568
0000000000000108 0000000000000000 WA 0 0 8
[22] .dynamic DYNAMIC 0000000000502670 00502670
0000000000000210 0000000000000010 WA 8 0 8
[23] .got PROGBITS 0000000000502880 00502880
0000000000002328 0000000000000000 WA 0 0 8
[24] .got.plt PROGBITS 0000000000504ba8 00504ba8
00000000000006a8 0000000000000000 WA 0 0 8
[25] .data PROGBITS 0000000000506250 00505250
0000000000004d50 0000000000000000 WA 0 0 8
[26] .bss NOBITS 000000000050afc0 00509fa0
000000000000ac30 0000000000000000 WA 0 0 64
[27] .comment PROGBITS 0000000000000000 00509fa0
00000000000000b2 0000000000000001 MS 0 0 1
[28] .shstrtab STRTAB 0000000000000000 0050a052
000000000000012e 0000000000000000 0 0 1Furthermore, I noticed that running a hash on the files yielded in identical results, meaning that the sha256sum libtflitebackend.so libtflitebackend.so.sym
d6c247460b33299529a4f7174e82f068d6f2f4e92315aacde2e1a4a0b91eb390 libtflitebackend.so
d6c247460b33299529a4f7174e82f068d6f2f4e92315aacde2e1a4a0b91eb390 libtflitebackend.so.sym
Compiling in debug mode results in binaries without optimization. You can however generate debug symbols with a release mode build. The main problem here is that as mentioned in my comment on the issue, To summarize, the process is:
P.S. regarding DWARF info, the compiler can be configured to generate them instead of the normal .debug symbols, but as far as I can tell, the symbols being in DWARF format is not required by Google, so we can use any format generated by LLVM without issue. |
freedomtan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
symbol table only solution seems to be good for now. We can keep working on having full debug information in another PR.




Uh oh!
There was an error while loading. Please reload this page.