bumptech / bumptech/glide

ANR in LruBitmapPool

Open
#5,421 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

"main" prio=5 tid=1 Blocked
| group="main" sCount=1 dsCount=0 flags=1 obj=0x72e02790 self=0xb40000783e288010
| sysTid=4442 nice=-10 cgrp=default sched=0/0 handle=0x79c525a4f8
| state=S schedstat=( 5518816383 4049321705 15267 ) utm=402 stm=149 core=2 HZ=100
| stack=0x7ff12ec000-0x7ff12ee000 stackSize=8192KB
| held mutexes=
at com.bumptech.glide.load.engine.bitmap_recycle.k.q(LruBitmapPool.java:-1)

waiting to lock <0x0bb29352> (a com.bumptech.glide.load.engine.bitmap_recycle.k) held by thread 41
at com.bumptech.glide.load.engine.bitmap_recycle.k.a(LruBitmapPool.java:4)
at com.bumptech.glide.b.r(Glide.java:7)
at com.bumptech.glide.b.onTrimMemory(Glide.java:1)
at android.app.Application.onTrimMemory(Application.java:287)
at android.app.ActivityThread.handleTrimMemory(ActivityThread.java:6377)
at android.app.ActivityThread.access$1300(ActivityThread.java:249)
at android.app.ActivityThread$ApplicationThread.lambda$scheduleTrimMemory$0(ActivityThread.java:1638)
at android.app.-$$Lambda$ActivityThread$ApplicationThread$tUGFX7CUhzB4Pg5wFd5yeqOnu38.accept(lambda:-1)
at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:278)
at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:201)
at com.android.internal.util.function.pooled.OmniFunction.run(OmniFunction.java:97)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:733)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7811)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:951)

Contributor guide

Open the contributing guide

Research direction

Start with the LruBitmapPool stack frames in LruBitmapPool.java and the trim-memory path through Glide.java. Investigate the reported lock contention around onTrimMemory and identify a reproducible cause or test case. Done means the ANR is explained and a verified fix or clear reproduction is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.