"android.ui" prio=5 tid=12 Blocked | group="main" sCount=1 ucsCount=0 flags=1 obj=0x17f405e8 self=0xb400007df01a8800 | sysTid=2904 nice=-2 cgrp=top-app sched=0/0 handle=0x7de7bbbcb0 | state=S schedstat=( 8623914505397688964064286150368108 ) utm=519874 stm=342516 core=5 HZ=100 | stack=0x7de7ab8000-0x7de7aba000 stackSize=1039KB | held mutexes= at com.android.server.locksettings.LockSettingsService.getCredentialTypeInternal(LockSettingsService.java:1341) - waiting to lock <0x05158af1> (acom.android.server.locksettings.SyntheticPasswordManager) held by thread 178 at com.android.server.locksettings.LockSettingsService.getCredentialType(LockSettingsService.java:1328) at com.android.internal.widget.LockPatternUtils$1.apply(LockPatternUtils.java:946) at com.android.internal.widget.LockPatternUtils$1.apply(LockPatternUtils.java:942) at android.app.PropertyInvalidatedCache.recompute(PropertyInvalidatedCache.java:754) at android.app.PropertyInvalidatedCache.query(PropertyInvalidatedCache.java:971) at com.android.internal.widget.LockPatternUtils.getCredentialTypeForUser(LockPatternUtils.java:985) at com.android.internal.widget.LockPatternUtils.getKeyguardStoredPasswordQuality(LockPatternUtils.java:819) at com.flyme.server.policy.view.FlymeConfirmPasswordView.getPasswordType(FlymeConfirmPasswordView.java:238) at com.flyme.server.policy.view.FlymeConfirmPasswordView.refreshViews(FlymeConfirmPasswordView.java:118) at com.flyme.server.policy.view.FlymeConfirmPasswordView.initViews(FlymeConfirmPasswordView.java:114) at com.flyme.server.policy.view.FlymeConfirmPasswordView.<init>(FlymeConfirmPasswordView.java:81) at com.flyme.server.policy.view.FlymeConfirmPasswordView.<init>(FlymeConfirmPasswordView.java:75) at java.lang.reflect.Constructor.newInstance0(Native method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:858) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1010) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1127) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.inflate(LayoutInflater.java:686) - locked <0x0f6a962a> (a java.lang.Object[]) at android.view.LayoutInflater.inflate(LayoutInflater.java:538) at android.view.LayoutInflater.inflate(LayoutInflater.java:485) at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:474) at android.app.Dialog.setContentView(Dialog.java:597) at com.flyme.server.policy.MzGlobalActions$MzGlobalActionsDialog.onCreate(MzGlobalActions.java:326) at android.app.Dialog.dispatchOnCreate(Dialog.java:436) at android.app.Dialog.show(Dialog.java:325) at com.flyme.server.policy.MzGlobalActions$MzGlobalActionsDialog.show(MzGlobalActions.java:824) at com.flyme.server.policy.MzGlobalActions.showGlobalActionsDialog(MzGlobalActions.java:177) at com.flyme.server.policy.MzGlobalActions.showGlobalActionsDialog(MzGlobalActions.java:134) at com.android.server.policy.PhoneWindowManager.mzShowGlobalActionsInternal(PhoneWindowManager.java:6358) at com.android.server.policy.PhoneWindowManager.showGlobalActionsInternal(PhoneWindowManager.java:1641) at com.android.server.policy.PhoneWindowManager$PolicyHandler.handleMessage(PhoneWindowManager.java:676) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.os.HandlerThread.run(HandlerThread.java:67) at com.android.server.ServiceThread.run(ServiceThread.java:44) at com.android.server.UiThread.run(UiThread.java:45)
gatekeeper只有一个线程,主线程既负责处理binder请求,也负责发起hwbinder请求,因此gatekeeperd binder请求无返回,说明gatekeeper HAL hwbinder请求无返回。 查看gatekeeperd的hwbinder上下文,可以看到outgoing事务已经送出,对端pid为1336,tid为1336。
1 2 3 4 5 6 7 8 9
proc 2448 context hwbinder thread 2448: l 10 need_return 0 tr 0 outgoing transaction 1265277317: 0000000000000000from2448:2448 to 1336:1336 code 2 flags 30 pri 0:120 r1 transaction complete thread 6226: l 12 need_return 0 tr 0 ref2437: desc 0 node 3 s 1 w 1 d 0000000000000000 ref2447: desc 1 node 210 s 1 w 1 d 0000000000000000 ref100646: desc 2 node 1233 s 1 w 1 d 0000000000000000
system 13361336122436163572 process_invoke_req 0 D gatekeeper@1.0- system 13361349122436163572 process_accept_req 0 S gatekeeper@1.0- system 13361350122436163572 process_accept_req 0 S gatekeeper@1.0- system 13361351122436163572 process_accept_req 0 S gatekeeper@1.0- system 13361352122436163572 process_accept_req 0 S gatekeeper@1.0-
[Tue May 914:58:242023] task:gatekeeper@1.0- state:D stack:11152 pid: 1336 ppid: 1 flags:0x04000008 [Tue May 914:58:242023] Call trace: [Tue May 914:58:242023] __switch_to+0x240/0x490 [Tue May 914:58:242023] __schedule+0x638/0xacc [Tue May 914:58:242023] schedule+0x110/0x204 [Tue May 914:58:242023] schedule_preempt_disabled+0x2c/0x4c [Tue May 914:58:242023] __mutex_lock+0x328/0x824 [Tue May 914:58:242023] __mutex_lock_slowpath+0x18/0x28 [Tue May 914:58:242023] mutex_lock+0x48/0x118 [Tue May 914:58:242023] process_invoke_req+0x1f0/0x80c [smcinvoke_dlkm] [Tue May 914:58:242023] smcinvoke_ioctl+0x80/0x404 [smcinvoke_dlkm] [Tue May 914:58:242023] __arm64_sys_ioctl+0x184/0x210 [Tue May 914:58:242023] invoke_syscall+0x60/0x150 [Tue May 914:58:242023] el0_svc_common+0xb8/0xf8 [Tue May 914:58:242023] do_el0_svc+0x28/0xa0 [Tue May 914:58:242023] el0_svc+0x24/0x84 [Tue May 914:58:242023] el0t_64_sync_handler+0x88/0xec [Tue May 914:58:242023] el0t_64_sync+0x1b4/0x1b8
process_invoke_req函数的地址为0x000000000000818c。
1 2
nm smcinvoke_dlkm.ko | grep -w process_invoke_req 000000000000818c t process_invoke_req
[Tue May 914:58:242023] sysrq: CPU7: [Tue May 914:58:242023] Call trace: [Tue May 914:58:242023] dump_backtrace.cfi_jt+0x0/0x8 [Tue May 914:58:242023] showacpu+0xf8/0x1b4 [Tue May 914:58:242023] flush_smp_call_function_queue+0x1f0/0x3a8 [Tue May 914:58:242023] do_handle_IPI+0xe0/0x344 [Tue May 914:58:242023] ipi_handler+0x20/0x34 [Tue May 914:58:242023] handle_percpu_devid_irq+0xc0/0x374 [Tue May 914:58:242023] handle_domain_irq+0xd0/0x154 [Tue May 914:58:242023] gic_handle_irq.33729+0x54/0x2bc [Tue May 914:58:242023] call_on_irq_stack+0x40/0x70 [Tue May 914:58:242023] do_interrupt_handler+0x44/0xa0 [Tue May 914:58:242023] el1_interrupt+0x34/0x64 [Tue May 914:58:242023] el1h_64_irq_handler+0x1c/0x2c [Tue May 914:58:242023] el1h_64_irq+0x7c/0x80 [Tue May 914:58:242023] __arm_smccc_smc+0x14/0x40 [Tue May 914:58:242023] __scm_smc_call+0x1b8/0x56c [qcom_scm] [Tue May 914:58:242023] qcom_scm_invoke_callback_response+0xa8/0x12c [qcom_scm] [Tue May 914:58:242023] invoke_cmd_handler+0x120/0x254 [smcinvoke_dlkm] [Tue May 914:58:242023] prepare_send_scm_msg+0x15c/0x450 [smcinvoke_dlkm] [Tue May 914:58:242023] process_invoke_req+0x294/0x80c [smcinvoke_dlkm] [Tue May 914:58:242023] smcinvoke_ioctl+0x80/0x404 [smcinvoke_dlkm] [Tue May 914:58:242023] __arm64_sys_ioctl+0x184/0x210 [Tue May 914:58:242023] invoke_syscall+0x60/0x150 [Tue May 914:58:242023] el0_svc_common+0xb8/0xf8 [Tue May 914:58:242023] do_el0_svc+0x28/0xa0 [Tue May 914:58:242023] el0_svc+0x24/0x84 [Tue May 914:58:242023] el0t_64_sync_handler+0x88/0xec [Tue May 914:58:242023] el0t_64_sync+0x1b4/0x1b8
06-1111:34:26.491286929516 E ActivityManager: 99% 2589/vendor.xingji.hardware.biometrics.face@1.0-service: 0% user + 99% kernel 06-1111:34:26.491286929516 E ActivityManager: 99% 2639/FaceAysncQueue: 0% user + 99% kernel