Skip to content

anr at co.daily.context.CallClientSharedContext$initializeNativeContext$1.onDevicesChanged(SourceFile:1) #34

Description

@lucifer-chen259

----- pid 21813 at 2026-02-09 23:05:54.167532401-0800 -----
Cmd line: ai.domusnext.hardware
Build fingerprint: 'rockchip/rk3576_u/rk3576_u:14/UQ1A.240205.004.B1/IFPD-14.0101.01:userdebug/release-keys'
ABI: 'arm64'
Build type: optimized
suspend all histogram: Sum: 2.248ms 99% C.I. 1us-580us Avg: 118.315us Max: 580us
DALVIK THREADS (91):
"main" prio=5 tid=1 Blocked
| group="main" sCount=1 ucsCount=0 flags=1 obj=0x72ba49f0 self=0xb400007cee4927b0
| sysTid=21813 nice=-10 cgrp=default sched=0/0 handle=0x7db62594f8
| state=S schedstat=( 21353461409 244292746 4372 ) utm=2035 stm=99 core=6 HZ=100
| stack=0x7fc0507000-0x7fc0509000 stackSize=8188KB
| held mutexes=
at co.daily.context.CallClientSharedContext$initializeNativeContext$1.onDevicesChanged(SourceFile:1)

  • waiting to lock <0x0b2596bb> (a co.daily.context.CallClientSharedContext) held by thread 89
    at co.daily.util.DailyAudioManager$1.onAudioDevicesAdded(SourceFile:1)
    at android.media.AudioManager$NativeEventHandlerDelegate$1.handleMessage(AudioManager.java:9928)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:205)
    at android.os.Looper.loop(Looper.java:294)
    at android.app.ActivityThread.main(ActivityThread.java:8248)
    at java.lang.reflect.Method.invoke(Native method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)

I establish the connection in a work thread, then CallClientSharedContext.initCallClientSharedContext() invokes nativeInitialize() (which internally calls pthread_cond_wait) while holding a synchronized lock. Meanwhile, DailyAudioManager registers AudioDevicesAddedCallback using the main thread's Looper, and this callback also needs to acquire the same Java lock. pthread_cond_wait waits for the audio device signal, but the signal sender is deadlocked on the main thread — resulting in a circular dependency deadlock.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions