Skip to content
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可以捕获,但是定位不到代码 #104

Open
luncang opened this issue Jan 19, 2022 · 0 comments
Open

ANR可以捕获,但是定位不到代码 #104

luncang opened this issue Jan 19, 2022 · 0 comments

Comments

@luncang
Copy link

luncang commented Jan 19, 2022

来看看系统的trace.txt文件捕获的ANR日志

DALVIK THREADS (51):
"Signal Catcher" daemon prio=5 tid=3 Runnable
  | group="system" sCount=0 dsCount=0 obj=0x12c003a0 self=0xe2033e00
  | sysTid=1390 nice=0 cgrp=default sched=0/0 handle=0xecf0a920
  | state=R schedstat=( 19787541 2336292 8 ) utm=0 stm=0 core=3 HZ=100
  | stack=0xece0e000-0xece10000 stackSize=1014KB
  | held mutexes= "mutator lock"(shared held)
  native: #00 pc 00350ac5  /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
  native: #01 pc 00331209  /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+308)
  native: #02 pc 00343231  /system/lib/libart.so (_ZN3art14DumpCheckpoint3RunEPNS_6ThreadE+620)
  native: #03 pc 0033d23b  /system/lib/libart.so (_ZN3art10ThreadList13RunCheckpointEPNS_7ClosureE+330)
  native: #04 pc 0033cf37  /system/lib/libart.so (_ZN3art10ThreadList4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEb+586)
  native: #05 pc 0033cc8f  /system/lib/libart.so (_ZN3art10ThreadList14DumpForSigQuitERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+574)
  native: #06 pc 00322275  /system/lib/libart.so (_ZN3art7Runtime14DumpForSigQuitERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+124)
  native: #07 pc 00326b9f  /system/lib/libart.so (_ZN3art13SignalCatcher13HandleSigQuitEv+1394)
  native: #08 pc 00325d0d  /system/lib/libart.so (_ZN3art13SignalCatcher3RunEPv+336)
  native: #09 pc 000470d3  /system/lib/libc.so (_ZL15__pthread_startPv+22)
  native: #10 pc 00019e3d  /system/lib/libc.so (__start_thread+6)
  (no managed stack frames)

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x7496b628 self=0xed985400
  | sysTid=1384 nice=-10 cgrp=default sched=0/0 handle=0xf0791534
  | state=S schedstat=( 736219581 145291503 1233 ) utm=59 stm=13 core=1 HZ=100
  | stack=0xff085000-0xff087000 stackSize=8MB
  | held mutexes=
  kernel: __switch_to+0x8c/0xb4
  kernel: pipe_wait+0x68/0xa0
  kernel: pipe_read+0x214/0x228
  kernel: __vfs_read+0xc4/0xf4
  kernel: vfs_read+0x78/0x12c
  kernel: SyS_read+0x5c/0xbc
  kernel: el0_svc_naked+0x24/0x28
  native: #00 pc 000496d8  /system/lib/libc.so (read+8)
  native: #01 pc 0001b063  /system/lib/libjavacore.so (???)
  native: #02 pc 004c6ba3  /data/dalvik-cache/arm/system@[email protected] (Java_libcore_io_Posix_readBytes__Ljava_io_FileDescriptor_2Ljava_lang_Object_2II+134)
  at libcore.io.Posix.readBytes(Native method)
  at libcore.io.Posix.read(Posix.java:169)
  at libcore.io.BlockGuardOs.read(BlockGuardOs.java:231)
  at libcore.io.IoBridge.read(IoBridge.java:471)
  at java.io.FileInputStream.read(FileInputStream.java:252)
  at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
  at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
  - locked <0x06300fd7> (a java.lang.UNIXProcess$ProcessPipeInputStream)
  at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:287)
  at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:350)
  at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:179)
  - locked <0x0e9470c4> (a java.io.InputStreamReader)
  at java.io.InputStreamReader.read(InputStreamReader.java:184)
  at java.io.BufferedReader.fill(BufferedReader.java:172)
  at java.io.BufferedReader.readLine(BufferedReader.java:335)
  - locked <0x0e9470c4> (a java.io.InputStreamReader)
  at java.io.BufferedReader.readLine(BufferedReader.java:400)
  at com.firefly.api.shell.Shell.writeCommand(Shell.java:72)
  at com.firefly.api.shell.Shell.execute(Shell.java:115)
  at com.firefly.api.FireflyApi.execSuCmd(FireflyApi.java:265)
  at com.firefly.api.FireflyApi.isEthConnect(FireflyApi.java:228)
  at com.yarward.a10doorcontrol.utils.DeviceSettingUtils.isEthernetConnect(DeviceSettingUtils.java:301)
  at com.yarward.a10doorcontrol.homepage.HomePageActivity.initFacePassSDK(HomePageActivity.java:375)
  at com.yarward.a10doorcontrol.homepage.HomePageActivity.initFacePass(HomePageActivity.java:1723)
  at com.yarward.a10doorcontrol.homepage.HomePageActivity.initDeviceSetting(HomePageActivity.java:1699)
  at com.yarward.a10doorcontrol.homepage.HomePageActivity.setSettingConfig(HomePageActivity.java:1552)
  at com.yarward.a10doorcontrol.homepage.HomePagePresenter$7.onSuccess(HomePagePresenter.java:407)
  at com.yarward.a10doorcontrol.homepage.HomePagePresenter$7.onSuccess(HomePagePresenter.java:393)
  at com.yarward.http.subsciber.CallBackSubsciber.onNext(CallBackSubsciber.java:52)
  at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:62)
  at io.reactivex.internal.util.HalfSerializer.onNext(HalfSerializer.java:107)
  at io.reactivex.internal.operators.observable.ObservableRetryWhen$RepeatWhenObserver.onNext(ObservableRetryWhen.java:100)
  at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:62)
  at io.reactivex.internal.operators.observable.ObservableOnErrorNext$OnErrorNextObserver.onNext(ObservableOnErrorNext.java:68)
  at io.reactivex.internal.operators.observable.ObservableDoFinally$DoFinallyObserver.onNext(ObservableDoFinally.java:80)
  at io.reactivex.internal.observers.DisposableLambdaObserver.onNext(DisposableLambdaObserver.java:58)
  at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:62)
  at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201)
  at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
  at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
  at android.os.Handler.handleCallback(Handler.java:755)
  at android.os.Handler.dispatchMessage(Handler.java:95)
  at android.os.Looper.loop(Looper.java:154)
  at android.app.ActivityThread.main(ActivityThread.java:6157)
  at java.lang.reflect.Method.invoke!(Native method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)

再来看看xcrash捕获的ANR日志

DALVIK THREADS (58):
"xcrash_trace_dp" prio=10 tid=13 Runnable
  | group="main" sCount=0 dsCount=0 obj=0x12c61310 self=0xdf50ea00
  | sysTid=1424 nice=-10 cgrp=default sched=0/0 handle=0xec310920
  | state=R schedstat=( 304758998 14534289 201 ) utm=19 stm=10 core=4 HZ=100
  | stack=0xec214000-0xec216000 stackSize=1014KB
  | held mutexes= "mutator lock"(shared held)
  native: #00 pc 00350ac5  /system/lib/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiP12BacktraceMapPKcPNS_9ArtMethodEPv+128)
  native: #01 pc 00331209  /system/lib/libart.so (_ZNK3art6Thread9DumpStackERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEbP12BacktraceMap+308)
  native: #02 pc 00343231  /system/lib/libart.so (_ZN3art14DumpCheckpoint3RunEPNS_6ThreadE+620)
  native: #03 pc 0033d23b  /system/lib/libart.so (_ZN3art10ThreadList13RunCheckpointEPNS_7ClosureE+330)
  native: #04 pc 0033cf37  /system/lib/libart.so (_ZN3art10ThreadList4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEEb+586)
  native: #05 pc 0033cc8f  /system/lib/libart.so (_ZN3art10ThreadList14DumpForSigQuitERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+574)
  native: #06 pc 00322275  /system/lib/libart.so (_ZN3art7Runtime14DumpForSigQuitERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+124)
  native: #07 pc 000048bb  /data/app/com.yarward.zhaji-2/lib/arm/libxcrash.so (???)
  native: #08 pc 000470d3  /system/lib/libc.so (_ZL15__pthread_startPv+22)
  native: #09 pc 00019e3d  /system/lib/libc.so (__start_thread+6)
  (no managed stack frames)

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x7496b628 self=0xed985400
  | sysTid=1384 nice=-10 cgrp=default sched=0/0 handle=0xf0791534
  | state=S schedstat=( 1796255448 617523581 4918 ) utm=136 stm=42 core=1 HZ=100
  | stack=0xff085000-0xff087000 stackSize=8MB
  | held mutexes=
  kernel: __switch_to+0x8c/0xb4
  kernel: SyS_epoll_wait+0x2cc/0x358
  kernel: compat_SyS_epoll_pwait+0xd0/0x134
  kernel: el0_svc_naked+0x24/0x28
  native: #00 pc 00048548  /system/lib/libc.so (__epoll_pwait+20)
  native: #01 pc 0001a1ed  /system/lib/libc.so (epoll_pwait+60)
  native: #02 pc 0001a21d  /system/lib/libc.so (epoll_wait+12)
  native: #03 pc 00011dd7  /system/lib/libutils.so (_ZN7android6Looper9pollInnerEi+118)
  native: #04 pc 00011cd3  /system/lib/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+26)
  native: #05 pc 000921a9  /system/lib/libandroid_runtime.so (_ZN7android18NativeMessageQueue8pollOnceEP7_JNIEnvP8_jobjecti+22)
  native: #06 pc 00bef5bd  /data/dalvik-cache/arm/system@[email protected] (Java_android_os_MessageQueue_nativePollOnce__JI+96)
  at android.os.MessageQueue.nativePollOnce(Native method)
  at android.os.MessageQueue.next(MessageQueue.java:323)
  at android.os.Looper.loop(Looper.java:136)
  at android.app.ActivityThread.main(ActivityThread.java:6157)
  at java.lang.reflect.Method.invoke!(Native method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant