AudioRecord crash in Xiaomi
Android version(s): 13 (MIUI 14.0.13) Android device(s): Mi 11 Ultra Oboe version: 1.9.0 App name used for testing: (Please try to reproduce the issue using the OboeTester or an Oboe sample.)
Short description (Please only report one bug per Issue. Do not combine multiple bugs.) When I use OBOE audio recording on Xiaomi devices, there is a chance that it will crash. Steps to reproduce
- openRecordStream
nativeAPI:AAudio,BufferCapacityInFrames:0,FramesPerBurst:0,ChannelCount:2,ChannelMask:Stereo,DeviceId:0,SessionId:-1,Format:PCM_Float,SampleRate:48000,SharingMode:shared,PerformanceMode:LL,InputPreset:Generic,Usage:Media,ContentType:Music,FormatConversionAllowed:true,ChannelConversionAllowed:true,RateConversionQuality:None,HardwareChannelCount:0,HardwareSampleRate:0,HardwareFormat:0,direction:INPUT
- startRecordStream
- crash
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A Build fingerprint: 'Xiaomi/star/star:13/TKQ1.220829.002/V14.0.13.0.TKACNXM:user/release-keys'
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A Revision: '0'
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A ABI: 'arm64'
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A Timestamp: 2024-11-04 20:08:14.733518935+0800
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A Process uptime: 2281s
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A ZygotePid: 66884048
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A Cmdline: com.bilibili.bilibililive.test
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A pid: 30632, tid: 21770, name: AudioRecord >>> com.bilibili.bilibililive.test <<<
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A uid: 10582
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x00000072935c7000
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A x0 b400007165ca6800 x1 00000072935c6cc0 x2 0000000000000480 x3 0000000000000004
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A x4 0000000000000000 x5 b40000716c263aa0 x6 b400007168aa4d00 x7 b400007168aa5180
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A x8 0000000000000240 x9 0000000000000240 x10 00000072935c7010 x11 00000000000000a0
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A x12 0000007165c28c30 x13 00000000000121e8 x14 00000000000121a8 x15 0000000000000500
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A x16 000000729693f9f0 x17 00000072968b441c x18 0000007155080000 x19 b400007165ca6800
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A x20 000000715553c000 x21 ffffffffffffffff x22 0000000000000000 x23 000000715553ba88
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A x24 000000729693cbf0 x25 0000000000000480 x26 0000000000000480 x27 b400007165ca6aa8
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A x28 000000715553c000 x29 000000715553ba10
2024-11-04 20:08:15.810 21785-21785 DEBUG crash_dump64 A lr 00000072968b3910 sp 000000715553b9a0 pc 00000072968b4494 pst 0000000020001000
2024-11-04 20:08:15.811 21785-21785 DEBUG crash_dump64 A backtrace:
2024-11-04 20:08:15.811 21785-21785 DEBUG crash_dump64 A #00 pc 000000000006b494 /system/lib64/libaudioclient.so (android::AudioRecord::isLongTimeZeroData(void const*, int)+120) (BuildId: 15bf9505713ef124c9ac13248ba87bdd)
2024-11-04 20:08:15.811 21785-21785 DEBUG crash_dump64 A #01 pc 000000000006a90c /system/lib64/libaudioclient.so (android::AudioRecord::processAudioBuffer()+1752) (BuildId: 15bf9505713ef124c9ac13248ba87bdd)
2024-11-04 20:08:15.811 21785-21785 DEBUG crash_dump64 A #02 pc 0000000000069f3c /system/lib64/libaudioclient.so (android::AudioRecord::AudioRecordThread::threadLoop()+288) (BuildId: 15bf9505713ef124c9ac13248ba87bdd)
2024-11-04 20:08:15.811 21785-21785 DEBUG crash_dump64 A #03 pc 0000000000013598 /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+424) (BuildId: 104125701f0f8a41374b9998e94209e9)
2024-11-04 20:08:15.811 21785-21785 DEBUG crash_dump64 A #04 pc 00000000000ceb84 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+144) (BuildId: 8bc9f832aa905efdb1b081e26fc56644)
2024-11-04 20:08:15.811 21785-21785 DEBUG crash_dump64 A #05 pc 00000000000f55c8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+208) (BuildId: 449f781894033dce6346794a1ee593e0)
2024-11-04 20:08:15.811 21785-21785 DEBUG crash_dump64 A #06 pc 000000000008efbc /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 449f781894033dce6346794a1ee593e0)
2024-11-04 20:08:15.820 8546-21416 C2SoftVpxEnc media.swcodec D bytes generated 2484
2024-11-04 20:08:15.830 1056-2676 stmvl53l5 [email protected]_64 I Filled up 3 events
2024-11-04 20:08:15.845 2228-21789 ActivityTaskManager system_server W Force finishing activity com.bilibili.bilibililive.test/com.bilibili.bililive.test.SceneActivity
Expected behavior Normal recording...
Actual behavior crash... Device Xiaomi 11 Ultra
Any additional context A relatively complete log: Mi11UltraRecordCrash.log
At present, a stable reproduction path has not been found. I will try my best to find it.
Looking forward to your reply, thank you~
Can confirm we are experiencing a similar issue to this at the moment in a deployed app on Xiaomi and Redmi handsets
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 25731 >>> <<<
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 0x00000000000d2f60 /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)
I notice that this bug was filed and closed with a resolution of a ROM update for XOAMI. Any ideas if this actually happened?
https://github.com/google/oboe/issues/1947
I can provide a detailed list of crash report devices that we are currently experiencing with the stack trace above
I get reports with the exactly same strack trace as @chriscope-RODE on Redmi Redmi Note 12 Pro with Android 13 (SDK 33).
Today I'v got a report of a crash from POCO F3 device. Same stacktrace.
Just bumping this to report that we are still seeing this on our end across various REDMI and POCO handsets running ANDROID 13. Not sure if any updates had been received??