----- pid 20930 at 2024-07-21 13:36:35.207552938+0800 ----- Cmd line: com.android.launcher Build fingerprint: 'xxx/release-keys' ABI: 'arm64' Build type: optimized suspend all histogram: Sum: 5.532ms 99% C.I. 2us-2958.079us Avg: 83.818us Max: 4255us DALVIK THREADS (52): "main" prio=5 tid=1 Native | group="main" sCount=1 ucsCount=0 flags=1 obj=0x77bd5fb8 self=0xb400007e50af9c00 | sysTid=2378 nice=-10 cgrp=top-app sched=0/0 handle=0x7e521594f8 | state=S schedstat=( 282836249 206702075 685 ) utm=15 stm=12 core=0 HZ=100 | stack=0x7fcda6b000-0x7fcda6d000 stackSize=8188KB | held mutexes= native: #00 pc 00000000000e6568 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+8) (BuildId: 72faca30b9bcf1e4042942620badb423) native: #01 pc 000000000009808c /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156) (BuildId: 72faca30b9bcf1e4042942620badb423) native: #02 pc 000000000005b3ac /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+284) (BuildId: 997b56887b57ac9e77cd2aee7c068758) native: #03 pc 000000000005c5e8 /system/lib64/libbinder.so (android::IPCThreadState::waitForResponse(android::Parcel*, int*)+72) (BuildId: 997b56887b57ac9e77cd2aee7c068758) native: #04 pc 000000000005c318 /system/lib64/libbinder.so (android::IPCThreadState::transact(int, unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+216) (BuildId: 997b56887b57ac9e77cd2aee7c068758) native: #05 pc 0000000000053a3c /system/lib64/libbinder.so (android::BpBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+188) (BuildId: 997b56887b57ac9e77cd2aee7c068758) native: #06 pc 000000000017bdb0 /system/lib64/libandroid_runtime.so (android_os_BinderProxy_transact(_JNIEnv*, _jobject*, int, _jobject*, _jobject*, int)+400) (BuildId: efc10adff2a34368676560cff811f79d) at android.os.BinderProxy.transactNative(Native method) at android.os.BinderProxy.transact(BinderProxy.java:584) at android.os.storage.IStorageManager$Stub$Proxy.mkdirs(IStorageManager.java:1461) at android.os.storage.StorageManager.mkdirs(StorageManager.java:1376) at android.app.ContextImpl.ensureExternalDirsExistOrFilter(ContextImpl.java:3380) at android.app.ContextImpl.getExternalFilesDirs(ContextImpl.java:847) - locked <0x049604e9> (a java.lang.Object) at android.content.ContextWrapper.getExternalFilesDirs(ContextWrapper.java:307) at b.i.c.a$b.b(ContextCompat.java:1) at androidx.core.content.FileProvider.c(FileProvider.java:23) at androidx.core.content.FileProvider.a(FileProvider.java:3) - locked <0x0e95456e> (a java.util.HashMap) at androidx.core.content.FileProvider.attachInfo(FileProvider.java:8) at android.app.ActivityThread.installProvider(ActivityThread.java:7718) at android.app.ActivityThread.installContentProviders(ActivityThread.java:7226) at android.app.ActivityThread.handleInstallProvider(ActivityThread.java:4238) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2419) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:239) at android.os.Looper.loop(Looper.java:337) at android.app.ActivityThread.main(ActivityThread.java:8140) at java.lang.reflect.Method.invoke(Native method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1054)
线程状态是Native,从堆栈信息看,在调用ContextWrapper.getExternalFilesDirs方法时,出现了一个锁,- locked <0x049604e9> (a java.lang.Object),然后调用到android.os.storage.IStorageManager$Stub$Proxy.mkdirs,说明调用binder机制与系统服务进行交互的时候发生了阻塞。
接着看Event log信息
1
07-02 10:13:56.741 1000 1674 2963 I am_anr : [0,2378,com.android.launcher,751550021,Input dispatching timed out (Application does not have a focused window)]
这里确定ANR类型,还是Input dispatching timed out (Application does not have a focused window)。
07-02 10:13:50.909 1000 1674 1935 W StorageManagerService: Reporting emulated;0 unmounted due to system locked 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: Failed to mount volume VolumeInfo{emulated;0}: 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: type=EMULATED diskId=null partGuid= mountFlags=PRIMARY|VISIBLE_FOR_WRITE 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: mountUserId=0 state=CHECKING 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: fsType=null fsUuid=null fsLabel=null 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: path=/storage/emulated internalPath=/data/media 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: com.android.server.storage.StorageSessionController$ExternalStorageServiceException: Failed to start session: [SessionId: emulated;0. UpperPath: /storage/emulated. LowerPath: /data/media] 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.storage.StorageUserConnection$ActiveConnection.startSession(StorageUserConnection.java:394) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.storage.StorageUserConnection.startSession(StorageUserConnection.java:111) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.storage.StorageSessionController.onVolumeMount(StorageSessionController.java:129) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.StorageManagerService$7.onVolumeChecking(StorageManagerService.java:2447) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.IVoldMountCallback$Stub.onTransact(IVoldMountCallback.java:92) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Binder.execTransactInternal(Binder.java:1306) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Binder.execTransact(Binder.java:1257) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.BinderProxy.transactNative(Native Method) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.BinderProxy.transact(BinderProxy.java:584) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.IVold$Stub$Proxy.mount(IVold.java:1716) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.StorageManagerService.mount(StorageManagerService.java:2439) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.StorageManagerService.-$$Nest$mmount(Unknown Source:0) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.StorageManagerService$StorageManagerServiceHandler.handleMessage(StorageManagerService.java:829) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Handler.dispatchMessage(Handler.java:106) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Looper.loopOnce(Looper.java:239) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Looper.loop(Looper.java:337) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.HandlerThread.run(HandlerThread.java:67) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: Caused by: java.util.concurrent.ExecutionException: android.os.ParcelableException: java.lang.IllegalStateException: Failed to start FUSE 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:371) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1998) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.storage.StorageUserConnection$ActiveConnection.waitForAsync(StorageUserConnection.java:379) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.storage.StorageUserConnection$ActiveConnection.waitForAsyncVoid(StorageUserConnection.java:358) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.storage.StorageUserConnection$ActiveConnection.startSession(StorageUserConnection.java:390) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: ... 16 more 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: Caused by: android.os.ParcelableException: java.lang.IllegalStateException: Failed to start FUSE 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:82) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:79) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Parcel.readParcelableInternal(Parcel.java:4775) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Parcel.readValue(Parcel.java:4532) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Parcel.readValue(Parcel.java:4312) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Parcel.-$$Nest$mreadValue(Unknown Source:0) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Parcel$LazyValue.apply(Parcel.java:4410) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Parcel$LazyValue.apply(Parcel.java:4369) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.BaseBundle.getValueAt(BaseBundle.java:394) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.BaseBundle.getValue(BaseBundle.java:374) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.BaseBundle.getValue(BaseBundle.java:357) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.BaseBundle.getValue(BaseBundle.java:350) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Bundle.getParcelable(Bundle.java:913) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.storage.StorageUserConnection$ActiveConnection.setResult(StorageUserConnection.java:448) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.storage.StorageUserConnection$ActiveConnection.lambda$waitForAsyncVoid$0$com-android-server-storage-StorageUserConnection$ActiveConnection(StorageUserConnection.java:356) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at com.android.server.storage.StorageUserConnection$ActiveConnection$$ExternalSyntheticLambda1.onResult(Unknown Source:4) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.RemoteCallback.sendResult(RemoteCallback.java:75) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.RemoteCallback$1.sendResult(RemoteCallback.java:52) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.IRemoteCallback$Stub.onTransact(IRemoteCallback.java:87) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Binder.execTransactInternal(Binder.java:1306) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.Binder.execTransact(Binder.java:1257) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: Caused by: java.lang.IllegalStateException: Failed to start FUSE 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at java.lang.reflect.Constructor.newInstance0(Native Method) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at java.lang.reflect.Constructor.newInstance(Constructor.java:343) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: at android.os.ParcelableException.readFromParcel(ParcelableException.java:56) 07-02 10:13:55.585 1000 1674 1830 E StorageManagerService: ... 21 more 07-02 10:13:55.585 1000 1674 1830 I StorageManagerService: Scheduling reset in 10s 07-02 10:13:55.586 root 340 340 I vold : fuse_unmounter scope_guard running 07-02 10:13:55.586 root 340 340 I vold : Unmounting fuse path /mnt/user/0/emulated 07-02 10:13:55.587 1000 1674 2680 W StorageManagerService: Reporting emulated;0 unmounted due to system locked 07-02 10:13:55.589 1000 1674 1935 W StorageManagerService: Reporting emulated;0 unmounted due to system locked 07-02 10:13:55.590 1002 2234 2234 W Looper : Slow dispatch took 6685ms main h=android.app.ActivityThread$H c=android.app.LoadedApk$ReceiverDispatcher$Args$$ExternalSyntheticLambda0@59e1b9b m=0 07-02 10:13:55.590 1000 1674 2665 W StorageManagerService: Reporting emulated;0 unmounted due to system locked