Crash at the end of a call

444 views
Skip to first unread message

Adam Ben-Ayoun

unread,
May 5, 2015, 12:16:24 PM5/5/15
to discuss...@googlegroups.com
Hi,

We have developed a WebRTC test application for Android (native), everything works fine most of the times, but once in about 100 connects/disconnects we get this crash (relevant part from the logs, if needed please let me know and I will add the rest):

05-05 18:42:51.337     648-1280/? D/PMS﹕ releaseWL(1b5c2c3e): PARTIAL_WAKE_LOCK  AudioIn 0x1 WorkSource{10211}
05-05 18:42:51.347      276-724/? E/audio_a2dp_hw﹕ adev_set_parameters: ERROR: set param called even when stream out is null
05-05 18:42:51.347     648-1280/? D/PMS﹕ acquireWL(9f2f7b5): PARTIAL_WAKE_LOCK  AudioIn 0x1 0 1013 WorkSource{10211}
05-05 18:42:51.357  22796-31300/? E/libOpenSLES﹕ frameworks/wilhelm/src/android/AudioRecorder_to_android.cpp:229: pthread_mutex_lock_timeout_np returned 110
05-05 18:42:51.357     648-1361/? D/PMS﹕ releaseWL(9f2f7b5): PARTIAL_WAKE_LOCK  AudioIn 0x1 WorkSource{10211}
05-05 18:42:51.367  22796-31300/? A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 31300 (AudioRecord)
05-05 18:42:51.367  22796-31300/? W/libc﹕ Security Level: (1), Debug inforamtion is controlled by the DUMPABLE flag.
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.367     648-1472/? D/PMS﹕ releaseWL(31adea9f): PARTIAL_WAKE_LOCK  AudioDirectOut 0x1 null
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.367     648-1587/? D/PMS﹕ acquireWL(eeace4a): PARTIAL_WAKE_LOCK  AudioDirectOut 0x1 0 1013 null
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.377     648-1364/? D/PMS﹕ releaseWL(eeace4a): PARTIAL_WAKE_LOCK  AudioDirectOut 0x1 null
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.367      276-725/? E/AudioPolicyManager﹕ unknown stream type
05-05 18:42:51.367      274-274/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-05 18:42:51.367      274-274/? I/DEBUG﹕ Build fingerprint: 'htc/htc_europe/m7:5.0.2/LRX22G/482424.2:user/release-keys'
05-05 18:42:51.367      274-274/? I/DEBUG﹕ Revision: '3'
05-05 18:42:51.367      274-274/? I/DEBUG﹕ ABI: 'arm'
05-05 18:42:51.367      274-274/? I/DEBUG﹕ pid: 22796, tid: 31300, name: AudioRecord  >>> com.budapp.budtest <<<
05-05 18:42:51.367      274-274/? I/DEBUG﹕ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
05-05 18:42:51.397      274-274/? I/DEBUG﹕ r0 00000000  r1 00000004  r2 ba1e56e0  r3 00000000
05-05 18:42:51.397      274-274/? I/DEBUG﹕ r4 ba1e52bc  r5 00000000  r6 00000372  r7 ffffffff
05-05 18:42:51.397      274-274/? I/DEBUG﹕ r8 00000000  r9 9eda8d00  sl 00000000  fp 9eda8d0c
05-05 18:42:51.397      274-274/? I/DEBUG﹕ ip 00000001  sp 9eda8cb8  lr a17e2beb  pc a17e2bee  cpsr 800f0030
05-05 18:42:51.397      274-274/? I/DEBUG﹕ backtrace:
05-05 18:42:51.407      274-274/? I/DEBUG﹕ #00 pc 00287bee  /data/app/com.budapp.budtest-1/lib/arm/libjingle_peerconnection_so.so
05-05 18:42:51.407      274-274/? I/DEBUG﹕ #01 pc 0000a46f  /system/lib/libwilhelm.so
05-05 18:42:51.407      274-274/? I/DEBUG﹕ #02 pc 00055179  /system/lib/libmedia.so (android::AudioRecord::processAudioBuffer()+752)
05-05 18:42:51.407      274-274/? I/DEBUG﹕ #03 pc 0005530d  /system/lib/libmedia.so (android::AudioRecord::AudioRecordThread::threadLoop()+148)
05-05 18:42:51.407      274-274/? I/DEBUG﹕ #04 pc 00011671  /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
05-05 18:42:51.407      274-274/? I/DEBUG﹕ #05 pc 00011131  /system/lib/libutils.so
05-05 18:42:51.407      274-274/? I/DEBUG﹕ #06 pc 00012f83  /system/lib/libc.so (__pthread_start(void*)+30)
05-05 18:42:51.407      274-274/? I/DEBUG﹕ #07 pc 00011047  /system/lib/libc.so (__start_thread+6)
05-05 18:42:51.467      276-769/? E/AudioStreamOutALSA﹕ PCM_Write set_amp_mode,3
05-05 18:42:51.967      648-946/? E/WifiStateMachine﹕ handleMessage: E msg.what=131155
05-05 18:42:51.967      648-946/? E/WifiStateMachine﹕ processMsg: ConnectedState
05-05 18:42:51.987      990-990/? D/WIFI_ICON﹕ updateWifiState: RSSI_CHANGED 3 -> 3
05-05 18:42:51.977      648-946/? E/WifiStateMachine﹕ ConnectedState !CMD_RSSI_POLL 255 0 "MACGATE" 00:1e:52:7b:92:f6 rssi=-37 f=2442 sc=60 link=65 tx=39.0, 0.0, 0.0  rx=110.6 bcn=0 [on:0 tx:0 rx:0 period:3004] from screen [on:0 period:616462418] gl hn u24 rssi=-32 ag=0 hr ticks 0,0,0 ls-=0 [56,56,60,60,65] brc=0 lrc=0
05-05 18:42:51.987      990-990/? D/StatusBar.NetworkController﹕ dumpIcon[(gone) stat_sys_5signal_5|null stat_sys_wifi_signal_inandout_4 (gone) F]

Thanks,
Adam

Henrik Andreasson

unread,
May 6, 2015, 3:16:03 AM5/6/15
to discuss...@googlegroups.com
Seems like OpenSL ES is used and that it not yet default (we are working on improvements and stability fixes). Try building without OpenSL ES and see if that helps.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adam Ben-Ayoun

unread,
May 6, 2015, 3:34:47 AM5/6/15
to discuss...@googlegroups.com
Thanks Henrik. 

Couple of questions:
1. What does it mean that is not yet default? I just built WebRTC the usual way.
2. Would disabling it might hurt voice quality on some devices?
3. What is the best way to disable it?

Thanks,
Adam

Henrik Andreasson

unread,
May 6, 2015, 4:19:47 AM5/6/15
to discuss...@googlegroups.com
On Wed, May 6, 2015 at 9:34 AM, Adam Ben-Ayoun <adam.be...@gmail.com> wrote:
Thanks Henrik. 

Couple of questions:
1. What does it mean that is not yet default? I just built WebRTC the usual way.

Just in case, set enable_android_opensl to 0 in your GYP_DEFINES. In latest WebRTC, it should already be the case and not needed, but just in case.
To be 100%, make a call and do

adb shell | grep 'WebRtcAudioTrack' and verify that you get logs from this class. Then you know that OpenSL ES is not used in your build.
 
2. Would disabling it might hurt voice quality on some devices?

It will result in a slightly higher total latency but that's all.
 
3. What is the best way to disable it?

See #1.
 

Thanks,
Adam

Adam Ben-Ayoun

unread,
May 6, 2015, 8:03:35 AM5/6/15
to discuss...@googlegroups.com
We thought we were using the latest WebRTC code in our tests, it turned out we didn't, after adding the newest libs to our test application, we cannot crash it anymore after 200+ trials (now we see WebRtcAudioTrack on the logs, and nothing related to openSL ES). 

Thanks!
Reply all
Reply to author
Forward
0 new messages