Forums - Crash during webRTC streaming

2 posts / 0 new
Last post
Crash during webRTC streaming
Jay2888
Join Date: 8 Oct 21
Posts: 2
Posted: Fri, 2021-10-08 03:10

Hi,

I've been investigating this issue for a few days now, and from resources I've read online I'm leaning towards it being a possible driver issue (as I've seen a few mentions of webRTC crashing with a similar stack trace, and suggestions to set android:hardwareAccelerated="false" as a fix - which I've tried but doesn't fix the issue). This is happening on Adreno 610 hardware.

The issue happens while performing a screen cast of an Android device screen, using the Agora SDK - typically happens after 5-10 minutes (but on very rare occasions happens within 5 seconds). It's always within drawOES+1044,_ as 'null pointer dereference'. Is this a possible out of memory issue? I have profiled memory usage, and GPU usage bounced between 30 and 40mb which seems fine. Am I correct in thinking that errors happening inside libGLESv2_adreno.so like this, are likely to be driver related?

I noticed when capturing at 10fps it never happened, so I'm running some tests at difference capture rates to see if I can work around the issue that way - but that's the kind of fix that I wouldn't feel entirely comfortable with.

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Redmi/lime_global/lime:10/QKQ1.200830.002/V12.0.15.0.QJQMIXM:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2021-10-08 13:03:47+0700
pid: 1792, tid: 1858, name: GENP.0  >>> com.test.device_bridge:screensharingsvc <<<
uid: 10246
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x12a
Cause: null pointer dereference
    x0  000000712e2d47b0  x1  000000712e2d47b0  x2  000000712e2d47ac  x3  0000000000000000
    x4  0000000000000000  x5  0000000000000005  x6  000000719ce02810  x7  000000719ce02810
    x8  000000000000001c  x9  000000719cf30248  x10 0000000000000003  x11 0000000000000000
    x12 000000719ce02810  x13 0000000000000072  x14 0000000000000000  x15 0000000000000006
    x16 0000000000000000  x17 0000000000000005  x18 0000007130751250  x19 000000719ce36400
    x20 0000000000000000  x21 0000000000000006  x22 000000719cf30100  x23 0000000000000000
    x24 000000000000001c  x25 0000000000000001  x26 0000007130765e00  x27 0000007233973500
    x28 0000007233973500  x29 000000712e2d4840
    sp  000000712e2d4710  lr  000000719420f8f4  pc  000000719420f904

backtrace:
      #00 pc 00000000003c6904  /vendor/lib64/egl/libGLESv2_adreno.so (!!!0000!8c73d24736b9cc4e391e8bdff21d4f!243b6bc!+244) (BuildId: 4a1e54f20fc2b69461e7133185df4daf)
      #01 pc 00000000003a1afc  /vendor/lib64/egl/libGLESv2_adreno.so (!!!0000!7b4d3d680da059de73d7f9795dc456!243b6bc!+2204) (BuildId: 4a1e54f20fc2b69461e7133185df4daf)
      #02 pc 0000000000393e10  /vendor/lib64/egl/libGLESv2_adreno.so (!!!0000!f56be09eb88f86833124f1df42e945!243b6bc!+24128) (BuildId: 4a1e54f20fc2b69461e7133185df4daf)
      #03 pc 00000000001a0644  /vendor/lib64/egl/libGLESv2_adreno.so (!!!0000!6b200851123c7898055fe62ff9f71f!243b6bc!+556) (BuildId: 4a1e54f20fc2b69461e7133185df4daf)
      #04 pc 0000000000188b04  /vendor/lib64/egl/libGLESv2_adreno.so (!!!0000!28254c066fd778faffa7894b1bd8b1!243b6bc!+204) (BuildId: 4a1e54f20fc2b69461e7133185df4daf)
      #05 pc 0000000001631d68  /system/framework/arm64/boot-framework.oat (art_jni_trampoline+168) (BuildId: 6f9487a3bba6f33eeb184ccc8030efde3e216894)
      #06 pc 00000000020051d4  /memfd:/jit-cache (deleted) (io.agora.rtc.gl.GlRectDrawer.drawOes+1044)
      #07 pc 0000000002003f34  /memfd:/jit-cache (deleted) (io.agora.rtc.video.MediaCodecVideoEncoder.encodeTexture+1428)
      #08 pc 0000000002007ebc  /memfd:/jit-cache (deleted) (io.agora.rtc.video.MediaCodecVideoEncoder.encodeTexture+92)
      #09 pc 0000000000137334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: ad57e75ac7886c4ea3e5d8b2f09cef9c)
      #10 pc 0000000000145fec  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: ad57e75ac7886c4ea3e5d8b2f09cef9c)
      #11 pc 00000000004b0960  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: ad57e75ac7886c4ea3e5d8b2f09cef9c)
      #12 pc 00000000004b1dac  /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+424) (BuildId: ad57e75ac7886c4ea3e5d8b2f09cef9c)
      #13 pc 000000000038c628  /apex/com.android.runtime/lib64/libart.so (art::JNI::CallBooleanMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+628) (BuildId: ad57e75ac7886c4ea3e5d8b2f09cef9c)
      #14 pc 000000000028ade8  /data/app/com.test.device_bridge-G-_K6foiQSto1IR-vZc0kA==/lib/arm64/libagora-rtc-sdk.so (BuildId: d7daddcdedf640b0a9c2386cc58d305e789f3f23)

stack:
         000000712e2d4690  00000071a1bad200  [anon:libc_malloc]
         000000712e2d4698  000000712e2d4770
         000000712e2d46a0  00000071a1bad200  [anon:libc_malloc]

 

 

  • Up0
  • Down0
Jay2888
Join Date: 8 Oct 21
Posts: 2
Posted: Sat, 2021-10-16 13:12

Lowering the framerate reduced the incidence of the crash, but still happens within about 20-30 minutes. Tested on a Mali GPU (Android 11) at the higher framerate where it happened often, and no crash after 3 hours.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.