-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anr in filament.Renderer.nBeginFrame #6960
Comments
Which version of Filament are you using? Also, could you share the full ANR logs please? |
filament version is 1.25.3 logcat: ANR: suspend all histogram: Sum: 6.923ms 99% C.I. 0.336us-2637.440us Avg: 84.426us Max: 3082us "main" prio=5 tid=1 Native "ADB-JDWP Connection Control Thread" daemon prio=0 tid=5 WaitingInMainDebuggerLoop "Jit thread pool worker thread 0" daemon prio=5 tid=6 Native "HeapTaskDaemon" daemon prio=5 tid=7 WaitingForTaskProcessor "ReferenceQueueDaemon" daemon prio=5 tid=8 Waiting
"FinalizerDaemon" daemon prio=5 tid=9 Waiting
"FinalizerWatchdogDaemon" daemon prio=5 tid=10 Waiting
"Binder:1974_1" prio=5 tid=11 Native "perfetto_hprof_listener" prio=10 tid=12 Native (still starting up) "Binder:1974_2" prio=5 tid=13 Native "Profile Saver" daemon prio=5 tid=14 Native "Timer-0" prio=5 tid=16 Waiting
"ConnectivityThread" prio=5 tid=18 Native "IBinderHelper-Thread" prio=5 tid=17 Native "RenderThread" daemon prio=7 tid=19 Native "Binder:1974_3" prio=5 tid=21 Native "queued-work-looper" prio=5 tid=20 Native "pool-5-thread-1" prio=5 tid=22 Waiting
"hwuiTask0" daemon prio=6 tid=23 Native "hwuiTask1" daemon prio=6 tid=24 Native "AsyncTask #1" prio=5 tid=26 Waiting
"sound" prio=5 tid=27 Native "buriedData" prio=5 tid=28 Native "Dispatch" prio=5 tid=29 Native "Binder:1974_4" prio=5 tid=2 Native "Binder:1974_5" prio=5 tid=4 Native "Binder:1974_6" prio=5 tid=15 Native "JobSystem::loop" prio=7 (not attached) "FEngine::loop" prio=7 (not attached) "FEngine::loop" prio=7 (not attached) "FEngine::loop" prio=7 (not attached) "AdrenoOsLib" prio=10 (not attached) "AdrenoOsLib" prio=10 (not attached) "FEngine::loop" prio=7 (not attached) "FEngine::loop" prio=7 (not attached) "AdrenoOsLib" prio=7 (not attached) "AdrenoOsLib" prio=7 (not attached) ----- end 1974 ----- |
another ANR logcat: ANR: suspend all histogram: Sum: 9.227ms 99% C.I. 0.352us-2790.719us Avg: 119.831us Max: 3435us "main" prio=5 tid=1 Native "perfetto_hprof_listener" prio=10 tid=5 Native (still starting up) "HeapTaskDaemon" daemon prio=5 tid=6 WaitingForTaskProcessor "ReferenceQueueDaemon" daemon prio=5 tid=7 Waiting
"FinalizerDaemon" daemon prio=5 tid=8 Waiting
"FinalizerWatchdogDaemon" daemon prio=5 tid=9 Waiting
"Jit thread pool worker thread 0" daemon prio=5 tid=10 Native "ADB-JDWP Connection Control Thread" daemon prio=0 tid=11 WaitingInMainDebuggerLoop "Binder:13732_1" prio=5 tid=12 Native "Binder:13732_2" prio=5 tid=13 Native "Profile Saver" daemon prio=5 tid=14 Native "Timer-0" prio=5 tid=15 Waiting
"ConnectivityThread" prio=5 tid=18 Native "IBinderHelper-Thread" prio=5 tid=17 Native "RenderThread" daemon prio=7 tid=2 Native "Binder:13732_3" prio=5 tid=4 Native "queued-work-looper" prio=5 tid=19 Native "pool-5-thread-1" prio=5 tid=20 Waiting
"hwuiTask0" daemon prio=6 tid=21 Native "hwuiTask1" daemon prio=6 tid=22 Native "AsyncTask #1" prio=5 tid=24 Waiting
"InsetsAnimations" prio=5 tid=25 Native "sound" prio=5 tid=28 Native "buriedData" prio=5 tid=29 Native "Dispatch" prio=5 tid=30 Native "pool-3-thread-1" prio=5 tid=31 Waiting
"glide-active-resources" prio=5 tid=37 Waiting
"pool-3-thread-2" prio=5 tid=40 Waiting
"io-pool-2-thread-0" prio=5 tid=42 Waiting
"io-pool-2-thread-1" prio=5 tid=43 Waiting
"io-pool-2-thread-2" prio=5 tid=44 Waiting
"io-pool-2-thread-3" prio=5 tid=45 Waiting
"io-pool-2-thread-4" prio=5 tid=46 Waiting
"pool-3-thread-3" prio=5 tid=47 Waiting
"Binder:13732_4" prio=5 tid=16 Native "pool-10-thread-1" prio=5 tid=23 Waiting
"Binder:13732_5" prio=5 tid=26 Native "Binder:13732_6" prio=5 tid=27 Native "Binder:13732_7" prio=5 tid=32 Native "Binder:13732_8" prio=5 tid=33 Native "JobSystem::loop" prio=7 (not attached) "FEngine::loop" prio=7 (not attached) "FEngine::loop" prio=7 (not attached) "FEngine::loop" prio=7 (not attached) "AdrenoOsLib" prio=10 (not attached) "AdrenoOsLib" prio=10 (not attached) "FEngine::loop" prio=7 (not attached) "FEngine::loop" prio=7 (not attached) "AdrenoOsLib" prio=7 (not attached) "AdrenoOsLib" prio=7 (not attached) ----- end 13732 ----- |
Can you help me look at the problem again? |
Can you give us exact and complete repro steps (step by step please)? |
anr.zip |
there is a high chance this is now fixed. my guess is that the ANR was caused by our SpinkLock, which we are not using anymore. |
android system
aar
filament 2.5.3
use the Monkey program to continuously load and unload the GLB resources of Filament, and replace the animation for display and rendering,there were two occurrences of anr within 3 hours.
frist:
suspend all histogram: Sum: 6.923ms 99% C.I. 0.336us-2637.440us Avg: 84.426us Max: 3082us
DALVIK THREADS (28):
"Signal Catcher" daemon prio=10 tid=3 Runnable
| group="system" sCount=0 dsCount=0 flags=0 obj=0x13282808 self=0xb400007a702922c0
| sysTid=1986 nice=-20 cgrp=foreground sched=0/0 handle=0x78f1a5acc0
| state=R schedstat=( 18744845 1492866 21 ) utm=0 stm=1 core=1 HZ=100
| stack=0x78f1963000-0x78f1965000 stackSize=995KB
| held mutexes= "mutator lock"(shared held)
native: #00 pc 000000000049ee3c /apex/com.android.art/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+140)
native: #1 pc 00000000005abff8 /apex/com.android.art/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits >&, bool, BacktraceMap*, bool) const+376)
native: #2 pc 00000000005c9130 /apex/com.android.art/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+924)
native: #3 pc 00000000005c3070 /apex/com.android.art/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+528)
native: #4 pc 00000000005c223c /apex/com.android.art/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&, bool)+1920)
native: #5 pc 00000000005c16dc /apex/com.android.art/lib64/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits >&)+776)
native: #6 pc 000000000056d69c /apex/com.android.art/lib64/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits >&)+196)
native: #7 pc 0000000000582c30 /apex/com.android.art/lib64/libart.so (art::SignalCatcher::HandleSigQuit()+1396)
native: #8 pc 0000000000581bfc /apex/com.android.art/lib64/libart.so (art::SignalCatcher::Run(void*)+348)
native: #9 pc 00000000000afd4c /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
native: #10 pc 0000000000050288 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
(no managed stack frames)
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 flags=1 obj=0x71a726a8 self=0xb400007a70287be0
| sysTid=1974 nice=-8 cgrp=foreground sched=0/0 handle=0x7b96b794f8
| state=S schedstat=( 168112688984 134995821510 725377 ) utm=12302 stm=4508 core=1 HZ=100
| stack=0x7fd67fb000-0x7fd67fd000 stackSize=8192KB
| held mutexes=
native: #00 pc 000000000004b34c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
native: #1 pc 00000000001d845c /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (???)
native: #2 pc 000000000016c50c /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (???)
native: #3 pc 0000000000123410 /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (???)
native: #4 pc 0000000000145678 /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (???)
native: #5 pc 000000000010c104 /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (filament::Renderer::beginFrame(filament::SwapChain*, unsigned long)+20)
native: #6 pc 0000000000101998 /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (Java_com_google_android_filament_Renderer_nBeginFrame+16)
at com.google.android.filament.Renderer.nBeginFrame(Native method)
at com.google.android.filament.Renderer.beginFrame(SourceFile:1)
at com.google.android.filament.utils.ModelViewer.render(SourceFile:49)
at com.ecompany.threedfilament.manager.ThreeDFilamentManager$FrameCallback.doFrame(SourceFile:39)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:727)
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:7965)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:603)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
suspend all histogram: Sum: 9.227ms 99% C.I. 0.352us-2790.719us Avg: 119.831us Max: 3435us
DALVIK THREADS (41):
"Signal Catcher" daemon prio=10 tid=3 Runnable
| group="system" sCount=0 dsCount=0 flags=0 obj=0x131030f8 self=0xb400007a7028eb20
| sysTid=13740 nice=-20 cgrp=foreground sched=0/0 handle=0x78f0a5acc0
| state=R schedstat=( 13595937 3627188 20 ) utm=0 stm=1 core=1 HZ=100
| stack=0x78f0963000-0x78f0965000 stackSize=995KB
| held mutexes= "mutator lock"(shared held)
native: #00 pc 000000000049ee3c /apex/com.android.art/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+140)
native: #1 pc 00000000005abff8 /apex/com.android.art/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits >&, bool, BacktraceMap*, bool) const+376)
native: #2 pc 00000000005c9130 /apex/com.android.art/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+924)
native: #3 pc 00000000005c3070 /apex/com.android.art/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+528)
native: #4 pc 00000000005c223c /apex/com.android.art/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&, bool)+1920)
native: #5 pc 00000000005c16dc /apex/com.android.art/lib64/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits >&)+776)
native: #6 pc 000000000056d69c /apex/com.android.art/lib64/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits >&)+196)
native: #7 pc 0000000000582c30 /apex/com.android.art/lib64/libart.so (art::SignalCatcher::HandleSigQuit()+1396)
native: #8 pc 0000000000581bfc /apex/com.android.art/lib64/libart.so (art::SignalCatcher::Run(void*)+348)
native: #9 pc 00000000000afd4c /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
native: #10 pc 0000000000050288 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
(no managed stack frames)
"main" prio=5 tid=1 Native
| group="main" sCount=1 dsCount=0 flags=1 obj=0x71a726a8 self=0xb400007a70287be0
| sysTid=13732 nice=0 cgrp=foreground sched=0/0 handle=0x7b96b794f8
| state=S schedstat=( 49871421618 34780776368 164334 ) utm=3468 stm=1518 core=0 HZ=100
| stack=0x7fd67fb000-0x7fd67fd000 stackSize=8192KB
| held mutexes=
native: #00 pc 000000000004b34c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
native: #1 pc 00000000001d845c /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (???)
native: #2 pc 000000000016c50c /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (???)
native: #3 pc 0000000000123410 /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (???)
native: #4 pc 0000000000145678 /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (???)
native: #5 pc 000000000010c104 /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (filament::Renderer::beginFrame(filament::SwapChain*, unsigned long)+20)
native: #6 pc 0000000000101998 /system/app/BM_Avatar_S**/BM_Avatar_S**.apk!libfilament-jni.so (offset ca4000) (Java_com_google_android_filament_Renderer_nBeginFrame+16)
at com.google.android.filament.Renderer.nBeginFrame(Native method)
at com.google.android.filament.Renderer.beginFrame(SourceFile:1)
at com.google.android.filament.utils.ModelViewer.render(SourceFile:49)
at com.ecompany.threedfilament.manager.ThreeDFilamentManager$FrameCallback.doFrame(SourceFile:39)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:727)
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:7965)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:603)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
The text was updated successfully, but these errors were encountered: