twilio / voice-quickstart-android

Quickstart app for the Voice Android SDK
https://www.twilio.com/docs/api/voice-sdk/android/getting-started
MIT License
184 stars 140 forks source link

Voice NDK Crash - Missing libc.so missing Buildid SIGABRT 0x0000000000000000 #610

Closed paco-spr closed 1 month ago

paco-spr commented 2 months ago

Description

A small percentage of our users experience a crash originating from the Twilio Android Voice NDK

Steps to Reproduce

Unknown

Code

We have twilio voice sdk and audio switch setup in a multi module project. Our modules that use the SDK have these setup lines in their build.gradle

dependencies { 
implementation("com.twilio:voice-android:6.6.1")
implementation("com.twilio:audioswitch:1.2.0")
}

// Specify that we want to split up the APK based on ABI
android { 
  splits {
      abi {
          // Enable ABI split
          isEnable = true

          // Clear list of ABIs
          reset()

          // Specify each architecture currently supported by the Twilio Voice SDK
          include("armeabi-v7a", "arm64-v8a", "x86", "x86_64")

          // Specify that we do not want an additional universal SDK
          isUniversalApk = false
      }
  }
}

Expected Behavior

App does not crash

Actual Behavior

App crashes

Reproduces How Often

About 0.1% of our users are affected.

Twilio Call SID(s)

N/A

Logs

Crashed: Thread: SIGABRT  0x0000000000000000
#00 pc 0x5b730 libc.so (BuildId: 37f537c2ba9dcbb262a0a68f41a21da4)
#01 pc 0x5b700 libc.so (BuildId: 37f537c2ba9dcbb262a0a68f41a21da4)
#02 pc 0x5d664 libc.so (BuildId: 37f537c2ba9dcbb262a0a68f41a21da4)
#03 pc 0x870b0 libc.so (BuildId: 37f537c2ba9dcbb262a0a68f41a21da4)
#04 pc 0x448f00 libtwilio_voice_android_so.so (BuildId: 02bbce6b9d8d85c911b17f7a32b3e22484a11e18)
#05 pc 0x51f558 libtwilio_voice_android_so.so (BuildId: 02bbce6b9d8d85c911b17f7a32b3e22484a11e18)
#06 pc 0x442304 libtwilio_voice_android_so.so (BuildId: 02bbce6b9d8d85c911b17f7a32b3e22484a11e18)
#07 pc 0xc37b4 libc.so (BuildId: 37f537c2ba9dcbb262a0a68f41a21da4)
#08 pc 0x5d084 libc.so (BuildId: 37f537c2ba9dcbb262a0a68f41a21da4)

Crashed: Thread: SIGABRT  0x0000000000000000
#00 pc 0x950b0 libc.so (BuildId: 02a91a85343debb2911714273ff2b670)
#01 pc 0x95080 libc.so (BuildId: 02a91a85343debb2911714273ff2b670)
#02 pc 0x771c60 libart.so (BuildId: 02bec5940be704b863f6514fc7d81c41)
#03 pc 0x357d0 libbase.so (BuildId: 6f67f69ff36b970d0b831cfdab3b578d)
#04 pc 0x34d58 libbase.so (BuildId: 6f67f69ff36b970d0b831cfdab3b578d)
#05 pc 0x79db00 libart.so (BuildId: 02bec5940be704b863f6514fc7d81c41)
#06 pc 0x24cc14 libart.so (BuildId: 02bec5940be704b863f6514fc7d81c41)
#07 pc 0x5967e8 libart.so (BuildId: 02bec5940be704b863f6514fc7d81c41)
#08 pc 0x7ba84d0410
#09 pc 0x7ba84d11fc
#10 pc 0xc15ffc libart.so (BuildId: 02bec5940be704b863f6514fc7d81c41)
#11 pc 0x33eba4 libart.so (BuildId: 02bec5940be704b863f6514fc7d81c41)
#12 pc 0x23a9ac libart.so (BuildId: 02bec5940be704b863f6514fc7d81c41)
#13 pc 0x53b8dc libart.so (BuildId: 02bec5940be704b863f6514fc7d81c41)
#14 pc 0x53b96c libart.so (BuildId: 02bec5940be704b863f6514fc7d81c41)
#15 pc 0x53b31c libart.so (BuildId: 02bec5940be704b863f6514fc7d81c41)
#16 pc 0x328ffc libc.so (BuildId: 02a91a85343debb2911714273ff2b670)
#17 pc 0xfd0f4 libc.so (BuildId: 02a91a85343debb2911714273ff2b670)
#18 pc 0x96a04 libc.so (BuildId: 02a91a85343debb2911714273ff2b670)
#19 pc 0xfd020 libc.so (BuildId: 02a91a85343debb2911714273ff2b670)
#20 pc 0x53b310 libart.so (BuildId: 02bec5940be704b863f6514fc7d81c41)

Versions

Gradle Version 8.8 Kotlin Version: 1.9.24 Target SDK: 34 Compile SDK: 34

Voice Android SDK

com.twilio:voice-android:6.6.1

OS Version

Various including Android 12, 13, and 14

Device Model

Various including Pixel 6, 7, Galaxy S22 Ultra, S23 Ultra, S20+ 5G

afalls-twilio commented 1 month ago

@paco-spr Thanks for the report... without steps to reproduce and a low reproduction rate 0.1%, not much we can do without more info...

Some basic questions... 1) Is your app using the getStats API? a) It it is... can you make sure that it is never making an Voice SDK API call from another thread, all the calls should be from the same thread

2) Do you have any additional info on what leads up to this crash?

paco-spr commented 1 month ago

@afalls-twilio Thanks for the quick reply. We do not use the getStats API. It does look like a few of the users were disconnecting from calls before the crash, and it does look like we missed ensuring that API call happens on the Main thread. That is likely the problem.

Thank you for the assistance, this is probably it!