Skip to content

Freeze: ANR triggered by main thread waiting for too long in [libart.so] art::ConditionVariable::WaitHoldingLocks #313

Duplicate

Description

@Tarquinen

Google Play reported this freeze (Android vitals).

  • Exception: ANR triggered by main thread waiting for too long
  • Where: [libart.so] art::ConditionVariable::WaitHoldingLocks
  • Last 7 days: 2 reports from about 2 users
  • Version codes: 380
  • Android API levels: 36
  • Last seen: 2026-11-24
  • Sample: Samsung Galaxy A26 5G, Android API 36, version code 380, commit 8207924
"main" tid=1 Native
  #00  pc 0x000000000009c29c  /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
  #01  pc 0x0000000000207c90  /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks+140)
  #02  pc 0x0000000000a19500  /apex/com.android.art/lib64/libart.so (artJniMethodEnd+128)
  #03  pc 0x00000000007659ac  /apex/com.android.art/lib64/libart.so (art_jni_method_end+12)
  at android.graphics.HardwareRenderer.nSyncAndDrawFrame (Native method)
  at android.graphics.HardwareRenderer.syncAndDrawFrame (HardwareRenderer.java:621)
  at android.view.ThreadedRenderer.draw (ThreadedRenderer.java:849)
  at android.view.ViewRootImpl.draw (ViewRootImpl.java:7095)
  at android.view.ViewRootImpl.performDraw (ViewRootImpl.java:6711)
  at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:5595)
  at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:3959)
  at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:13034)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1961)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:1970)
  at android.view.Choreographer.doCallbacks (Choreographer.java:1423)
  at android.view.Choreographer.doFrame (Choreographer.java:1348)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1930)
  at android.os.Handler.handleCallback (Handler.java:1070)
  at android.os.Handler.dispatchMessage (Handler.java:125)
  at android.os.Looper.dispatchMessage (Looper.java:358)
  at android.os.Looper.loopOnce (Looper.java:288)
  at android.os.Looper.loop (Looper.java:392)
  at android.app.ActivityThread.main (ActivityThread.java:10346)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:638)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:972)

Play Console (needs access):

Activity

  1. added
    crash
    on Nov 25, 2026
  2. Tarquinen commented on Nov 25, 2026

    @Tarquinen
    MemberAuthor

    Same kind of report as #256 and #276 (details there): the ANR dump caught the main thread returning from native code, so the stall itself isn't in the report.

    Cause: unknown. In both raw reports (Galaxy A26 5G and Honor Magic5 Pro, API 36, v380) the main thread had just finished a call that waits for the RenderThread and was blocked switching back to Java because the dump had it marked suspended. No GC was running (HeapTaskDaemon idle in both) and the only busy app threads were the event stream and a network request. On the Galaxy the main thread was drawing a frame (nSyncAndDrawFrame) and the RenderThread was still inside the GPU flush (GrDirectContext::flushAndSubmit), so the frame was slow on the GPU side. On the Honor a Compose Popup was being dismissed during recomposition (PopupLayout.dismiss → nDestroyHardwareResources) and the RenderThread was already idle. The app has about 30 popups and dropdown menus, and nothing in either report says which one, or which screen was drawing.
    Reproduced: no. There's no app frame or busy thread to test against, and #256 already showed on an emulator how the dump freezes a thread at a JNI return. A slow GPU flush on a Mali or Adreno phone isn't something the emulator reproduces.
    On dev: can't tell. The stall isn't in the stack, so there's no code path to compare.
    Fix: none, no proven cause.
    Not checked: Play Console's ANR details (what ran before the dump), and behaviour on a real Samsung or Honor phone.

  3. added
    crash-triaged
    on Nov 25, 2026
  4. Tarquinen commented on Nov 29, 2026

    @Tarquinen
    MemberAuthor

    Same kind of report as #256: the main thread was idle when the ANR dump ran. These are tracked as one issue there now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashcrash-triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions