Status Update
Comments
an...@google.com <an...@google.com> #2
Looks like an overflow in libvpx:
2024-06-21 09:41:24.383 31922-32195 DEBUG pid-31922 A *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2024-06-21 09:41:24.383 31922-32195 DEBUG pid-31922 A Build fingerprint: 'HUAWEI/ELE-AL00/HWELE:10/HUAWEIELE-AL00/10.1.0.162C00:user/release-keys'
2024-06-21 09:41:24.383 31922-32195 DEBUG pid-31922 A Revision: '0'
2024-06-21 09:41:24.383 31922-32195 DEBUG pid-31922 A ABI: 'arm64'
2024-06-21 09:41:24.384 31922-32195 libc pid-31922 E Access denied finding property "persist.mygote.disable"
2024-06-21 09:41:24.384 31922-32195 libc pid-31922 E Access denied finding property "persist.mygote.escape.enable"
2024-06-21 09:41:24.389 31922-32195 DEBUG pid-31922 A SYSVMTYPE: Maple
APPVMTYPE: Art
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A Timestamp: 2024-06-21 09:41:24+0800
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A pid: 31922, tid: 32195, name: mediaswcodec >>> media.swcodec <<<
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A uid: 1046
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A Abort message: 'ubsan: mul-overflow'
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A x0 0000000000000000 x1 0000000000007dc3 x2 0000000000000006 x3 0000007688a803f0
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000018
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A x8 00000000000000f0 x9 4f8e54c1d119ab14 x10 0000000000000001 x11 0000000000000000
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A x12 fffffff0ffffffdf x13 0000000000000000 x14 000000770e7d567c x15 000000770e7d567c
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A x16 000000770dae7a08 x17 000000770dac77c0 x18 00000076881ea000 x19 0000000000007cb2
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A x20 0000000000007dc3 x21 00000000ffffffff x22 0000063b19075284 x23 0000000000989680
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A x24 0000007688a81020 x25 0000000000000000 x26 0000002586f31d50 x27 0000002586f2fe90
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A x28 0000002586f37a20 x29 0000007688a80490
2024-06-21 09:41:24.390 31922-32195 DEBUG pid-31922 A sp 0000007688a803d0 lr 000000770da7c640 pc 000000770da7c66c
2024-06-21 09:41:24.400 31922-32195 DEBUG pid-31922 A
backtrace:
2024-06-21 09:41:24.400 31922-32195 DEBUG pid-31922 A #00 pc 000000000007066c /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) (BuildId: b91c775ccc9b0556e91bc575a2511cd0)
2024-06-21 09:41:24.400 31922-32195 DEBUG pid-31922 A #01 pc 000000000019f1ec /apex/com.android.media.swcodec/lib64/libvpx.so (abort_with_message(char const*)+20) (BuildId: c1a8f110ec615504d71bd69e8286bb89)
2024-06-21 09:41:24.400 31922-32195 DEBUG pid-31922 A #02 pc 000000000019f240 /apex/com.android.media.swcodec/lib64/libvpx.so (__ubsan_handle_mul_overflow_minimal_abort+24) (BuildId: c1a8f110ec615504d71bd69e8286bb89)
2024-06-21 09:41:24.400 31922-32195 DEBUG pid-31922 A #03 pc 00000000000784ec /apex/com.android.media.swcodec/lib64/libvpx.so (vp8e_encode+1676) (BuildId: c1a8f110ec615504d71bd69e8286bb89)
2024-06-21 09:41:24.400 31922-32195 DEBUG pid-31922 A #04 pc 0000000000131e90 /apex/com.android.media.swcodec/lib64/libvpx.so (vpx_codec_encode+168) (BuildId: c1a8f110ec615504d71bd69e8286bb89)
2024-06-21 09:41:24.400 31922-32195 DEBUG pid-31922 A #05 pc 00000000000171dc /apex/com.android.media.swcodec/lib64/libcodec2_soft_vp8enc.so (android::C2SoftVpxEnc::process(std::__1::unique_ptr<C2Work, std::__1::default_delete<C2Work>> const&, std::__1::shared_ptr<C2BlockPool> const&)+3684) (BuildId: c3811bb2b970686c4bb57b9533058e0c)
2024-06-21 09:41:24.400 31922-32195 DEBUG pid-31922 A #06 pc 000000000000a7f4 /apex/com.android.media.swcodec/lib64/libcodec2_soft_common.so (android::SimpleC2Component::processQueue()+2576) (BuildId: e279a9ab227aa43691773c1a9959bec0)
2024-06-21 09:41:24.400 31922-32195 DEBUG pid-31922 A #07 pc 00000000000098ec /apex/com.android.media.swcodec/lib64/libcodec2_soft_common.so (android::SimpleC2Component::WorkHandler::onMessageReceived(android::sp<android::AMessage> const&)+176) (BuildId: e279a9ab227aa43691773c1a9959bec0)
2024-06-21 09:41:24.401 31922-32195 DEBUG pid-31922 A #08 pc 00000000000168d8 /apex/com.android.media.swcodec/lib64/libstagefright_foundation.so (android::AHandler::deliverMessage(android::sp<android::AMessage> const&)+48) (BuildId: 8ad8e4722e889dae61aa47c8127d7db1)
2024-06-21 09:41:24.401 31922-32195 DEBUG pid-31922 A #09 pc 0000000000019dc0 /apex/com.android.media.swcodec/lib64/libstagefright_foundation.so (android::AMessage::deliver()+100) (BuildId: 8ad8e4722e889dae61aa47c8127d7db1)
2024-06-21 09:41:24.401 31922-32195 DEBUG pid-31922 A #10 pc 0000000000017348 /apex/com.android.media.swcodec/lib64/libstagefright_foundation.so (android::ALooper::loop()+560) (BuildId: 8ad8e4722e889dae61aa47c8127d7db1)
2024-06-21 09:41:24.401 31922-32195 DEBUG pid-31922 A #11 pc 00000000000136f0 /apex/com.android.media.swcodec/lib64/libutils.so (android::Thread::_threadLoop(void*)+316) (BuildId: 7e2d43608fad9a37c5987c4d81f4d6a9)
2024-06-21 09:41:24.401 31922-32195 DEBUG pid-31922 A #12 pc 00000000000cf7c0 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: b91c775ccc9b0556e91bc575a2511cd0)
2024-06-21 09:41:24.401 31922-32195 DEBUG pid-31922 A #13 pc 00000000000721a8 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: b91c775ccc9b0556e91bc575a2511cd0)
2024-06-21 09:41:24.467 1089-1089 /system/bin/tombstoned pid-1089 E Tombstone written to: /data/tombstones/tombstone_02
Side note: this component is intended for issues with Jetpack media libraries like ExoPlayer but I couldn't find a codec-framework specific component (but there are codec-related bugs at the top level public tracker component).
gu...@gmail.com <gu...@gmail.com> #4
We've seen this issue on Samsung's Android12 and 13
jz...@google.com <jz...@google.com> #5
Why doesn't the problem occur when I restart my phone?
We need more detail to isolate where the overflow is occurring. If the overflow is due to a large timestamp, restarting the device may cause smaller values to be used. If it's content based then we would need a capture of the raw video to reproduce or a more detailed stacktrace.
gu...@gmail.com <gu...@gmail.com> #6
Hope this helps locate the problem
jz...@google.com <jz...@google.com> #7
In addition to the above information, the problem phone will be notified in logcat:Codec2 component "c2.android.vp8.encoder" died
Hope this helps locate the problem
This doesn't tell us very much. We know the codec is crashing due to an overflow, but we need more details about the encoding to determine the issue. Timestamps being passed are one possibility. Another is if a high bitrate is targeted and the content is complex; there have been some fixes related to this upstream. You mentioned Android 12 and 13, are you able to update those devices to use a newer version of Android or libvpx?
Description
2.At present, it was found that some devices (Huawei, Samsung, etc.) used MediaCodec for video coding would crash, and the function would return to normal after restarting the phone.
3.Use "video/x-vnd.on2.vp8" to encode, and MediaMuxer format is "MediaMuxer.OutputFormat.MUXER_OUTPUT_WEBM"
4.MediaCodec uses asynchronous encoding. In the onError method, the callback exception information is as follows:
MediaCodec onError=android.media.MediaCodecCodecException: Error 0xffffffe
Attached is the detailed log
Looking forward to reply!