Skip to content

Crash on Xiaomi Devices (Android 13) after 16KB page size update #317

@hyperhug

Description

@hyperhug

Summary

After updating Dissonance and Opus libraries to the latest version with 16KB page size support, the application is experiencing crashes on Xiaomi devices running Android 13. The crash occurs in the native audio recording system (libaudioclient.so).

Crash Details

Crash Signature: SIGSEGV

Crash Location: android::AudioRecord::isLongTimeZeroData(void const*, int)

Status: In production

Stack Trace

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 11882 >>> com.example.app <

backtrace:
  #00  pc 0x000000000006e9f0  /system/lib64/libaudioclient.so (android::AudioRecord::isLongTimeZeroData(void const*, int)+128)
  #01  pc 0x000000000006de60  /system/lib64/libaudioclient.so (android::AudioRecord::processAudioBuffer()+1752)
  #02  pc 0x000000000006d490  /system/lib64/libaudioclient.so (android::AudioRecord::AudioRecordThread::threadLoop()+288)
  #03  pc 0x00000000000136d0  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+424)
  #04  pc 0x00000000000d1f60  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+144)
  #05  pc 0x00000000000f57c8  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208)
  #06  pc 0x000000000008f1bc  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68)

Impact Statistics

Overall Impact (Last 60 Days)

  • Affected Users: 2,880 (2.88K)
  • Total Events: 51,900 (51.9K)
  • Last Occurred: 4 hours ago
  • Primary Android Version: Android 13 (SDK 33)
  • Issue Visibility: Foreground (100%)

Affected Devices

Device Affected Users % of Total Events % of Events RAM (Total) System on Chip
Redmi sweet 1,480 51.4% 23,329 45.0% ~7,934 MB Qualcomm SM7150
Xiaomi nabu 296 10.3% 4,066 7.8% 6,144 MB (5,769 MB) Qualcomm SM8150
POCO alioth 208 7.2% 3,957 7.6% ~7,886 MB Qualcomm SMB250
POCO garnet 196 6.8% 8,306 16.0% ~10,827 MB Qualcomm SM7435
Xiaomi pipa 116 4.0% 2,107 4.1% ~7,980 MB Qualcomm SM8250
POCO vayu 115 4.0% 1,919 3.7% ~7,863 MB Qualcomm SM8150
Redmi garnet 97 3.4% 3,089 6.0% 8,192 MB (7,656 MB) Qualcomm SM7435
POCO redwood 62 2.2% 1,270 2.4% ~7,539 MB Qualcomm SM7325
Xiaomi courbet 43 1.5% 609 1.2% 6,144 MB (5,840 MB) Qualcomm SM7150
POCO marble 32 1.1% 1,022 2.0% ~11,702 MB QTI SM7475
Other devices 235 8.1% 2,226 4.2% Various Various

Key Observations

  1. Device Distribution: Predominantly affects Xiaomi/Redmi/POCO devices
  2. Top Affected Device: Redmi sweet accounts for over half of all affected users (51.4%)
  3. Chipset Pattern: Primarily impacts Qualcomm Snapdragon chipsets (SM7xxx and SM8xxx series)
  4. Android Version: Exclusively affects Android 13 (SDK 33) devices
  5. Memory Range: Devices with 4-12 GB RAM are affected

Why we think that it's Dissonance that's causing it

In the latest open testing release, we removed Dissonance completely and the crash has stopped occurring. This confirms that the issue was directly related to the Dissonance library's incompatibility with Xiaomi's Android 13 audio implementation when using 16KB page size.

Unfortunately, we cannot back test it to see if previous versions of Dissonance are still working because Google Play Store has stopped receiving libraries that are not 16KB aligned.

Screenshots from Google Play Developer Console

Overall crash statistics OS, Devices statistics of the crash Stack trace of the crash Full list of affected devices

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions