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
[SR-5757] Android: SwiftRuntime dlopen() failed on `/system/lib/libcutils.so #48327
Comments
Comment by Amr Aboelela (JIRA) @milseman can you help with this error? |
I'm afraid that is well beyond my understanding. Any idea why that is trying to be opened? Also does that .so exist at that path? RTLD_NOLOAD should attempt to determine if it's there, but I believe it won't try to actually do the load. |
Comment by Amr Aboelela (JIRA) I found in https://developer.android.com/about/versions/nougat/android-7.0-changes.html In order to reduce the impact that this restriction may have on currently released apps, a set of libraries that see significant use—such as |
I'm not sure what you're looking for here. I'm completely unfamiliar with Android and am not in a position where I can even test potential approaches. If you have questions about the standard library or generic Darwin/Linux functionality, I might be able to advise. |
Comment by Amr Aboelela (JIRA) Created PR #11615 |
Comment by Amr Aboelela (JIRA) It turned out that this error is coming from this function in ImageInspectionELF.cpp from the line marked red. static SectionInfo getSectionInfo(const char *imageName,
SectionInfo sectionInfo = { 0, nullptr }; void *handle = dlopen(imageName, RTLD_LAZY | RTLD_NOLOAD); if (!handle) {
} ... |
Environment
Android
Additional Detail from JIRA
md5: a52dc7b4e60f4e341cdcf24421b2bba6
Issue Description:
08-23 11:58:59.438 25922-25922/com.example.addswift A/SwiftRuntime: dlopen() failed on `/system/lib/libcutils.so': dlopen failed: library "/system/lib/libcutils.so" wasn't loaded and RTLD_NOLOAD prevented it
08-23 11:58:59.448 25922-25922/com.example.addswift A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 25922 (xample.addswift)
[ 08-23 11:58:59.451 645: 645 W/ ]
debuggerd: handling request: pid=25922 uid=10061 gid=10061 tid=25922
08-23 11:58:59.671 25957-25957/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-23 11:58:59.672 25957-25957/? A/DEBUG: Build fingerprint: 'Android/sdk_phone_armv7/generic:7.0/NYC/3245079:userdebug/test-keys'
08-23 11:58:59.672 25957-25957/? A/DEBUG: Revision: '0'
08-23 11:58:59.672 25957-25957/? A/DEBUG: ABI: 'arm'
08-23 11:58:59.673 25957-25957/? A/DEBUG: pid: 25922, tid: 25922, name: xample.addswift >>> com.example.addswift <<<
08-23 11:58:59.673 25957-25957/? A/DEBUG: signal 6 (SIGABRT), code
6 (SI_TKILL), fault addr -------08-23 11:58:59.693 25957-25957/? A/DEBUG: Abort message: 'dlopen() failed on `/system/lib/libcutils.so': dlopen failed: library "/system/lib/libcutils.so" wasn't loaded and RTLD_NOLOAD prevented it'
08-23 11:58:59.694 25957-25957/? A/DEBUG: r0 00000000 r1 00006542 r2 00000006 r3 00000008
08-23 11:58:59.694 25957-25957/? A/DEBUG: r4 ad71c584 r5 00000006 r6 ad71c52c r7 0000010c
08-23 11:58:59.695 25957-25957/? A/DEBUG: r8 92565cb0 r9 bef4f2e8 sl 925f31ac fp bef4f218
08-23 11:58:59.695 25957-25957/? A/DEBUG: ip 00000058 sp bef4f1c0 lr ace2932f pc ace2bb7c cpsr 20000010
08-23 11:58:59.730 25957-25957/? A/DEBUG: backtrace:
08-23 11:58:59.730 25957-25957/? A/DEBUG: #00 pc 00048b7c /system/lib/libc.so (tgkill+12)
08-23 11:58:59.731 25957-25957/? A/DEBUG: #1 pc 0004632b /system/lib/libc.so (pthread_kill+34)
08-23 11:58:59.731 25957-25957/? A/DEBUG: #2 pc 0001c6d5 /system/lib/libc.so (raise+10)
08-23 11:58:59.731 25957-25957/? A/DEBUG: #3 pc 00018237 /system/lib/libc.so (__libc_android_abort+34)
08-23 11:58:59.732 25957-25957/? A/DEBUG: #4 pc 00017770 /system/lib/libc.so (abort+4)
08-23 11:58:59.732 25957-25957/? A/DEBUG: #5 pc 004de804 /data/app/com.example.addswift-2/lib/arm/libswiftCore.so
The text was updated successfully, but these errors were encountered: