VSync callback ANR
Reported by
lukavi...@gmail.com,
Jun 28 2018
|
||||
Issue descriptionSteps to reproduce the problem: There are no solid steps to reproduce. We have thousands of reports each day with this ANR (see attached files). This definitely happens because of external ad providers. We have multiple WebViews in the app with ads and sometimes our it hangs with ANR. What is the expected behavior? What went wrong? ANR in vsync callback. ANR stacktraces dumped at 20:12:09, see logcat. "main" prio=5 tid=1 Native | group="main" sCount=1 dsCount=0 obj=0x7624d280 self=0xe9b85400 | sysTid=9468 nice=-10 cgrp=default sched=0/0 handle=0xecea2534 | state=S schedstat=( 4551797136 507719252 5491 ) utm=390 stm=64 core=6 HZ=100 | stack=0xff5e0000-0xff5e2000 stackSize=8MB | held mutexes= kernel: __switch_to+0x9c/0xac kernel: futex_wait_queue_me+0xd8/0x13c kernel: futex_wait+0xec/0x1e0 kernel: do_futex+0xcc/0x490 kernel: compat_SyS_futex+0xcc/0x148 kernel: __sys_trace_return+0x0/0x4 kernel: (null) native: #00 pc 0001751c /system/lib/libc.so (syscall+28) native: #01 pc 000475ed /system/lib/libc.so (_ZL24__pthread_cond_timedwaitP23pthread_cond_internal_tP15pthread_mutex_tbPK8timespec+102) native: #02 pc 000394e3 /data/app/com.android.chrome-1/base.apk (???) at org.chromium.ui.base.WindowAndroid.nativeOnVSync(Native method) at org.chromium.ui.base.WindowAndroid.a(PG:142) at bQf.a(PG:16) at bPT.doFrame(PG:22) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:957) at android.view.Choreographer.doCallbacks(Choreographer.java:734) at android.view.Choreographer.doFrame(Choreographer.java:667) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:945) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6776) at java.lang.reflect.Method.invoke!(Native method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) Did this work before? N/A Chrome version: 67.0.3396.87 Channel: stable OS Version: 7.0 Flash Version: Do you have any ideas how we can debug this issue? ANR stacktrace contains line "000394e3 /data/app/com.android.chrome-1/base.apk (???)". Is it possible to find out what the line in the source code matches this address, Chrome version: 67.0.3396.87?
,
Jun 28 2018
Related issues: https://bugs.chromium.org/p/chromium/issues/detail?id=805782 https://stackoverflow.com/questions/50945853/how-to-fix-anr-issue-on-data-app-com-android-chrome-1-base-apk https://stackoverflow.com/questions/50268578/anr-application-not-responding-crash-in-google-play-console-which-i-dont-unde https://stackoverflow.com/questions/50905444/anr-investigating-with-trace-txt
,
Jun 28 2018
,
Jun 28 2018
This is somewhat similar to b/67755599 (Google internal, sorry!). From that bug, Bo commented: webview sends a sync IPC to the renderer process in OnBeginFrame, so that's hanging for some reason. Bo, is there any signal from traces.txt that looks suspicious?
,
Jun 28 2018
chrome doesn't ship unwind tables (to reduce binary size) so debuggerd can't unwind the native stack. Top frame of the stack is generally useless since it's generally in some generic library call and doesn't indicate where the call is coming from. Looking that traces.txt, all the relevant threads that UI thread is waiting for appears to be idle, which is weird. But either way, without a somewhat consistent repro, there isn't much we can do.
,
Jun 29 2018
is there any public debug builds of chromium for android? we've managed to reproduce it once, but there is no new info
,
Jun 29 2018
No, and debug builds are significantly bigger and slower such that if a problem is due to a race, then it's likely to reproduce. I'm not sure if we publish debug symbols, but even if we do, that doesn't help in this case, since you can only symbolize that one frame which is generally unhelpful. What needs to happen is to build a release build *with unwind tables* so that debuggerd can walk the entire native stack. Reproduce the ANR, and then symbolize the entire native stack. So the most helpful thing you can do here is to give us exact instructions on how to reproduce this ANR. Which app, what steps, which version of webview, which version of android, what device, etc etc.
,
Jul 11
,
Aug 30
This is my most common ANR at this point. Anyone have any ideas? I've never had it happen to me. "main" prio=5 tid=1 Native | group="main" sCount=1 dsCount=0 obj=0x76c50608 self=0xef205400 | sysTid=16510 nice=-4 cgrp=default sched=0/0 handle=0xf242d548 | state=S schedstat=( 234795728987 33489457230 411477 ) utm=19868 stm=3611 core=2 HZ=100 | stack=0xff38d000-0xff38f000 stackSize=8MB | held mutexes= #00 pc 0000000000017540 /system/lib/libc.so (syscall+28) #01 pc 0000000000047beb /system/lib/libc.so (_ZL24__pthread_cond_timedwaitP23pthread_cond_internal_tP15pthread_mutex_tbPK8timespec+102) #02 pc 0000000000e47793 /data/app/com.android.chrome-2/base.apk (???) at org.chromium.ui.base.WindowAndroid.nativeOnVSync (Native method) at org.chromium.ui.base.WindowAndroid.a (SourceFile:142) at bKj.doFrame (SourceFile:37) at android.view.Choreographer$CallbackRecord.run (Choreographer.java:957) at android.view.Choreographer.doCallbacks (Choreographer.java:734) at android.view.Choreographer.doFrame (Choreographer.java:667) at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:945) at android.os.Handler.handleCallback (Handler.java:751) at android.os.Handler.dispatchMessage (Handler.java:95) at android.os.Looper.loop (Looper.java:154) at android.app.ActivityThread.main (ActivityThread.java:6776) at java.lang.reflect.Method.invoke! (Native method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1518) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1408)
,
Sep 6
Issue 881339 has been merged into this issue.
,
Nov 17
I have the same issue on my app and it seems it suddenly started on October 18th and increased day by day, and it is the top ANR on my ANR list now. I don't have much information other than the play store log below. I couldn't even create the issue myself. I can only say that I am using Admob, Facebook and Mopub to show banners and interstitials and they are using webview. There are other threads traces in the list but couldn't see any suspicious thread state and trace. main" tid=1 Native "main" prio=5 tid=1 Native | group="main" sCount=1 dsCount=0 obj=0x75a367d0 self=0xac304e00 | sysTid=30043 nice=-10 cgrp=default sched=0/0 handle=0xaf549548 | state=S schedstat=( 4518867842 1451598315 9974 ) utm=357 stm=94 core=1 HZ=100 | stack=0xbe797000-0xbe799000 stackSize=8MB | held mutexes= #00 pc 0000000000017778 /system/lib/libc.so (syscall+28) #01 pc 000000000004788d /system/lib/libc.so (_ZL24__pthread_cond_timedwaitP23pthread_cond_internal_tP15pthread_mutex_tbPK8timespec+102) #02 pc 0000000000e9b2ab /data/app/com.android.chrome-2/base.apk (???) at org.chromium.ui.base.WindowAndroid.nativeOnVSync (Native method) at org.chromium.ui.base.WindowAndroid.a (SourceFile:166) at bZj.a (SourceFile:16) at bYU.doFrame (SourceFile:22) at android.view.Choreographer$CallbackRecord.run (Choreographer.java:928) at android.view.Choreographer.doCallbacks (Choreographer.java:705) at android.view.Choreographer.doFrame (Choreographer.java:637) at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:916) at android.os.Handler.handleCallback (Handler.java:751) at android.os.Handler.dispatchMessage (Handler.java:95) at android.os.Looper.loop (Looper.java:154) at android.app.ActivityThread.main (ActivityThread.java:6816) at java.lang.reflect.Method.invoke! (Native method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1565) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1453)
,
Nov 17
I have yet to reproduce it but it is my most common ANR. I even bought one of the phones that is up at the top of the report and still can't reproduce it. My app does use the WebView but now I'm wondering if it has to do with ads.
,
Dec 5
We have the same issue. Any news on resolving this? Google is starting to punish apps for their ANR rate, we really need to understand why is this happening and how to fix this.
,
Dec 6
The issue is marked as won't fix, I recommend creating a new one if you have more information. It is my most common anr and I'm terrified of it hurting my ranking, so far it hasn't thankfully. Has it affected you already?
,
Dec 6
Filing a new bug will just cause it to be duplicated into this. See comment 7 for more info on how to move this forward. Specifically, this bit: So the most helpful thing you can do here is to give us exact instructions on how to reproduce this ANR. Which app, what steps, which version of webview, which version of android, what device, etc etc.
,
Dec 6
#15 I think the issue is that none of us (as far as I know) have reproduced the issue, we just get ANRs on the Play Store console. I even bought one of the phones listed there and I have yet to reproduce the issue.
,
Jan 17
(6 days ago)
Device tested :- Samsung S8,S9,S9 plus ========================= ANR stack trace :- "main" prio=5 tid=1 Native | group="main" sCount=1 dsCount=0 flags=1 obj=0x743ae538 self=0xed4ab000 | sysTid=15670 nice=-10 cgrp=default sched=0/0 handle=0xf1a714bc | state=S schedstat=( 19319679915 5884419924 104161 ) utm=1204 stm=727 core=4 HZ=100 | stack=0xff695000-0xff697000 stackSize=8MB | held mutexes= kernel: (couldn't read /proc/self/task/15670/stack) native: #00 pc 00019178 /system/lib/libc.so (syscall+28) native: #01 pc 000488f7 /system/lib/libc.so (_ZL24__pthread_cond_timedwaitP23pthread_cond_internal_tP15pthread_mutex_tbPK8timespec+102) native: #02 pc 00e9b133 /data/app/com.android.chrome-Hg3Iqd8xpyz0FjL9DpWwyQ==/base.apk (???) at org.chromium.ui.base.WindowAndroid.nativeOnVSync(Native method) at org.chromium.ui.base.WindowAndroid.a(SourceFile:166) at bZj.a(SourceFile:16) at bYU.doFrame(SourceFile:22) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:909) at android.view.Choreographer.doCallbacks(Choreographer.java:723) at android.view.Choreographer.doFrame(Choreographer.java:655) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6938) at java.lang.reflect.Method.invoke(Native method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
,
Jan 17
(5 days ago)
#17 did you find a way to reproduce the issue? I have several phones I could try it on. |
||||
►
Sign in to add a comment |
||||
Comment 1 by lukavi...@gmail.com
, Jun 28 2018357 KB
357 KB View Download
2.1 MB
2.1 MB Download
843 KB
843 KB View Download