Post by fnllc on Apr 13, 2022 12:13:08 GMT
I have been plagued by many fdsan crashes during the Rhoconnect sync operation since upgrading to Android 30 SDK. I'm using the latest Rhodes 7.4 on the 7-4-stable branch.
The problem seems to be with blob (image files) and Rhoconnect.
Android Studio Debug Log:
2022-04-13 08:00:05.625 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:625 b2a60cb0 SSLImplJava| SSL connect to sync.mywebsite.com:443
2022-04-13 08:00:05.626 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:626 b2a60cb0 SSLImplJava| Creating secure SSL factory
2022-04-13 08:00:05.640 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:640 b2a60cb0 SSLImplJava| Creating TrustManager for system certificates
2022-04-13 08:00:05.641 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:641 b2a60cb0 SSLImplJava| Loading all SSL certificates from config
2022-04-13 08:00:05.641 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:641 b2a60cb0 SSLImplJava| SSL certificates loaded: 0
2022-04-13 08:00:05.641 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:641 b2a60cb0 SSLImplJava| Creating TrustManager for custom certificates
2022-04-13 08:00:05.642 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:642 b2a60cb0 SSLImplJava| clientSSLCertificate is
2022-04-13 08:00:05.646 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:646 b2a60cb0 SSLImplJava| Secure SSL factory initialization completed
2022-04-13 08:00:06.265 24295-24615/com.myapps.myapp W/Adreno-GSL: <gsl_ldd_control:553>: ioctl fd 182 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 22 Invalid argument
2022-04-13 08:00:06.276 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:06:276 b2a60cb0 Sync| Got 0(Processed: 2) records of 2 from server. Source: MyModel. Version: 3
2022-04-13 08:00:06.277 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:06:276 b2a60cb0 Sync| SyncSource: pass_through = false
2022-04-13 08:00:06.281 24295-24364/com.myapps.myapp A/libc: fdsan: attempted to close file descriptor 141, expected to be unowned, actually owned by unique_fd 0x765cef4d74
2022-04-13 08:00:06.689 24295-24364/com.myapps.myapp A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 24364 (Thread-8), pid 24295 (pps.myapp)
Production Version Google Play Console Log:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.myapps.myapp <<<
backtrace:
#00 pc 0000000000053ab0 /apex/com.android.runtime/lib64/bionic/libc.so (fdsan_error(char const*, ...)+556)
#00 pc 00000000000537bc /apex/com.android.runtime/lib64/bionic/libc.so (android_fdsan_close_with_tag+752)
#00 pc 0000000000053f28 /apex/com.android.runtime/lib64/bionic/libc.so (close+16)
#00 pc 0000000000665da0 /data/app/~~mqJGi_iQs_Qr8oW-GApzAA==/com.myapps.myapp-n9fkScFzSoljuRmaXQ03zg==/lib/arm64/librhodes.so (Curl_closesocket+72)
I found the following in the fdsan documentation that may be relevant:
fdsan is a file descriptor sanitizer added to Android in API level 29. In API level 29, fdsan warns when it finds a bug. In API level 30, fdsan aborts when it finds a bug.
android.googlesource.com/platform/bionic/+/master/docs/fdsan.md
This may explain why the app is crashing with Android SDK 30 and was fine with Android SDK 29.
It is not possible to revert to Android SDK 29, because the minimum required targetSDK is 30.
The problem seems to be with blob (image files) and Rhoconnect.
Android Studio Debug Log:
2022-04-13 08:00:05.625 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:625 b2a60cb0 SSLImplJava| SSL connect to sync.mywebsite.com:443
2022-04-13 08:00:05.626 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:626 b2a60cb0 SSLImplJava| Creating secure SSL factory
2022-04-13 08:00:05.640 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:640 b2a60cb0 SSLImplJava| Creating TrustManager for system certificates
2022-04-13 08:00:05.641 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:641 b2a60cb0 SSLImplJava| Loading all SSL certificates from config
2022-04-13 08:00:05.641 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:641 b2a60cb0 SSLImplJava| SSL certificates loaded: 0
2022-04-13 08:00:05.641 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:641 b2a60cb0 SSLImplJava| Creating TrustManager for custom certificates
2022-04-13 08:00:05.642 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:642 b2a60cb0 SSLImplJava| clientSSLCertificate is
2022-04-13 08:00:05.646 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:05:646 b2a60cb0 SSLImplJava| Secure SSL factory initialization completed
2022-04-13 08:00:06.265 24295-24615/com.myapps.myapp W/Adreno-GSL: <gsl_ldd_control:553>: ioctl fd 182 code 0xc040094a (IOCTL_KGSL_GPU_COMMAND) failed: errno 22 Invalid argument
2022-04-13 08:00:06.276 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:06:276 b2a60cb0 Sync| Got 0(Processed: 2) records of 2 from server. Source: MyModel. Version: 3
2022-04-13 08:00:06.277 24295-24364/com.myapps.myapp I/APP: I 04/13/2022 08:00:06:276 b2a60cb0 Sync| SyncSource: pass_through = false
2022-04-13 08:00:06.281 24295-24364/com.myapps.myapp A/libc: fdsan: attempted to close file descriptor 141, expected to be unowned, actually owned by unique_fd 0x765cef4d74
2022-04-13 08:00:06.689 24295-24364/com.myapps.myapp A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 24364 (Thread-8), pid 24295 (pps.myapp)
Production Version Google Play Console Log:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.myapps.myapp <<<
backtrace:
#00 pc 0000000000053ab0 /apex/com.android.runtime/lib64/bionic/libc.so (fdsan_error(char const*, ...)+556)
#00 pc 00000000000537bc /apex/com.android.runtime/lib64/bionic/libc.so (android_fdsan_close_with_tag+752)
#00 pc 0000000000053f28 /apex/com.android.runtime/lib64/bionic/libc.so (close+16)
#00 pc 0000000000665da0 /data/app/~~mqJGi_iQs_Qr8oW-GApzAA==/com.myapps.myapp-n9fkScFzSoljuRmaXQ03zg==/lib/arm64/librhodes.so (Curl_closesocket+72)
I found the following in the fdsan documentation that may be relevant:
fdsan is a file descriptor sanitizer added to Android in API level 29. In API level 29, fdsan warns when it finds a bug. In API level 30, fdsan aborts when it finds a bug.
android.googlesource.com/platform/bionic/+/master/docs/fdsan.md
This may explain why the app is crashing with Android SDK 30 and was fine with Android SDK 29.
It is not possible to revert to Android SDK 29, because the minimum required targetSDK is 30.