nextcloud / nextcloud/talk-android

blocked main thread because of PeerConnectionWrapper.removePeerConnection

Open
#5,052 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop
Dominant language
Kotlin
Stars
739
Forks
321
Avg merge
14h 59m
Merged PRs (30d)
151

Description

seems to be a problem since v21.0.0

"main" tid=1 Native
  #00  pc 0x0000000000099000  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32)
  #01  pc 0x000000000009dc80  /apex/com.android.runtime/lib64/bionic/libc.so (__futex_wait_ex+148)
  #02  pc 0x0000000000104244  /apex/com.android.runtime/lib64/bionic/libc.so (pthread_cond_wait+80)
  #03  pc 0x00000000004729d8  /data/app/~~GQpUn6xfy4VS__fhG3FO0Q==/com.nextcloud.talk2-ea4fvHwzrTiOa66uf4oOTA==/base.apk (BuildId: 582f068037b18243)
  #04  pc 0x0000000000aaeefc  /data/app/~~GQpUn6xfy4VS__fhG3FO0Q==/com.nextcloud.talk2-ea4fvHwzrTiOa66uf4oOTA==/base.apk (BuildId: 582f068037b18243)
  #05  pc 0x0000000000aaef4c  /data/app/~~GQpUn6xfy4VS__fhG3FO0Q==/com.nextcloud.talk2-ea4fvHwzrTiOa66uf4oOTA==/base.apk (BuildId: 582f068037b18243)
  #06  pc 0x00000000003764f4  /data/app/~~GQpUn6xfy4VS__fhG3FO0Q==/com.nextcloud.talk2-ea4fvHwzrTiOa66uf4oOTA==/base.apk (BuildId: 582f068037b18243)
  at org.webrtc.JniCommon.nativeReleaseRef (Native method)
  at org.webrtc.DataChannel.dispose (DataChannel.java:173)
  at com.nextcloud.talk.webrtc.PeerConnectionWrapper.removePeerConnection (PeerConnectionWrapper.java:240)
  at com.nextcloud.talk.activities.CallActivity.endPeerConnection (CallActivity.kt:2508)
  at com.nextcloud.talk.activities.CallActivity.hangup (CallActivity.kt:2048)
  at com.nextcloud.talk.activities.CallActivity.initCallActionClickListeners$lambda$19 (CallActivity.kt:716)
  at com.nextcloud.talk.activities.CallActivity.$r8$lambda$sDK8z2GBQPzgvhGnB3OPzYOcpwA (unavailable)
  at com.nextcloud.talk.activities.CallActivity$$ExternalSyntheticLambda58.onClick (D8$$SyntheticClass)
  at android.view.View.performClick (View.java:7740)
  at android.view.View.performClickInternal (View.java:7710)
  at android.view.View.-$$Nest$mperformClickInternal (unavailable)
  at android.view.View$PerformClick.run (View.java:30629)
  at android.os.Handler.handleCallback (Handler.java:958)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:257)
  at android.os.Looper.loop (Looper.java:368)
  at android.app.ActivityThread.main (ActivityThread.java:8839)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:572)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1049)

"signaling_threa - 13640" tid=74 Blocked
  at com.nextcloud.talk.webrtc.PeerConnectionWrapper$DataChannelObserver.onMessage (PeerConnectionWrapper.java:420)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading PeerConnectionWrapper.removePeerConnection at PeerConnectionWrapper.java:240 and DataChannelObserver.onMessage at PeerConnectionWrapper.java:420, then trace the hangup path through CallActivity.endPeerConnection and hangup. Reproduce the blocked-main-thread report during call termination; done means removing the peer connection no longer blocks the main thread.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
audio-video-rtc, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.