android anr 中查看 线程间死锁。

找关键字Blocked, 发现tid=66 与tid=67 发生死锁。

"WifiP2pService" prio=5 tid=66 Blocked
| group="main" sCount=1 dsCount=0 flags=1 obj=0x14485288 self=0x70e4e6cc00
| sysTid=2542 nice=0 cgrp=default sched=0/0 handle=0x704c6b4d50
| state=S schedstat=( 984217978 403895725 2574 ) utm=62 stm=36 core=4 HZ=100
| stack=0x704c5b2000-0x704c5b4000 stackSize=1039KB
| held mutexes=
at com.android.server.wifi.WifiNative$InterfaceDestoyedListenerInternal.onDestroyed(WifiNative.java:671)
- waiting to lock <0x0657502b> (a java.lang.Object) held by thread 67
at com.android.server.wifi.WifiVendorHal$StaInterfaceDestroyedListenerInternal.onDestroyed(WifiVendorHal.java:389)
at com.android.server.wifi.HalDeviceManager$InterfaceDestroyedListenerProxy.action(HalDeviceManager.java:2133)
at com.android.server.wifi.HalDeviceManager$ListenerProxy.trigger(HalDeviceManager.java:2098)
at com.android.server.wifi.HalDeviceManager.dispatchDestroyedListeners(HalDeviceManager.java:2049)
- locked <0x07f2e6b0> (a java.lang.Object)
at com.android.server.wifi.HalDeviceManager.removeIfaceInternal(HalDeviceManager.java:1969)
- locked <0x07f2e6b0> (a java.lang.Object)
at com.android.server.wifi.HalDeviceManager.executeChipReconfiguration(HalDeviceManager.java:1866)
- locked <0x07f2e6b0> (a java.lang.Object)
at com.android.server.wifi.HalDeviceManager.createIfaceIfPossible(HalDeviceManager.java:1443)
- locked <0x07f2e6b0> (a java.lang.Object)
at com.android.server.wifi.HalDeviceManager.createIface(HalDeviceManager.java:1399)
- locked <0x07f2e6b0> (a java.lang.Object)
at com.android.server.wifi.HalDeviceManager.createP2pIface(HalDeviceManager.java:252)
at com.android.server.wifi.p2p.WifiP2pNative.createP2pIface(WifiP2pNative.java:179)
at com.android.server.wifi.p2p.WifiP2pNative.setupInterface(WifiP2pNative.java:234)
at com.android.server.wifi.p2p.WifiP2pServiceImpl$P2pStateMachine.setInterfaceUpIfNeed(WifiP2pServiceImpl.java:4439)
at com.android.server.wifi.p2p.WifiP2pServiceImpl$P2pStateMachine.access$2100(WifiP2pServiceImpl.java:766)
at com.android.server.wifi.p2p.WifiP2pServiceImpl$P2pStateMachine$DefaultState.processMessage(WifiP2pServiceImpl.java:1057)
at com.android.internal.util.StateMachine$SmHandler.processMsg(StateMachine.java:992)
at com.android.internal.util.StateMachine$SmHandler.handleMessage(StateMachine.java:809)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)

"ClientModeImpl" prio=5 tid=67 Blocked
| group="main" sCount=1 dsCount=0 flags=1 obj=0x14485368 self=0x70e4e6b000
| sysTid=2541 nice=0 cgrp=default sched=0/0 handle=0x704c7bdd50
| state=S schedstat=( 8846289901 4212102394 19419 ) utm=678 stm=206 core=0 HZ=100
| stack=0x704c6bb000-0x704c6bd000 stackSize=1039KB
| held mutexes=
at com.android.server.wifi.WifiVendorHal.isVendorHalSupported(WifiVendorHal.java:313)
- waiting to lock <0x07f2e6b0> (a java.lang.Object) held by thread 66
at com.android.server.wifi.WifiNative.removeStaIface(WifiNative.java:931)
- locked <0x0657502b> (a java.lang.Object)
at com.android.server.wifi.WifiNative.teardownInterface(WifiNative.java:1341)
- locked <0x0657502b> (a java.lang.Object)
at com.android.server.wifi.QtiClientModeManager$ClientModeStateMachine$StartedState.exit(QtiClientModeManager.java:342)
at com.android.internal.util.StateMachine$SmHandler.invokeExitMethods(StateMachine.java:1021)
at com.android.internal.util.StateMachine$SmHandler.performTransitions(StateMachine.java:877)
at com.android.internal.util.StateMachine$SmHandler.handleMessage(StateMachine.java:819)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)

posted on 2021-03-25 15:22  huangguanyuan  阅读(477)  评论(0编辑  收藏  举报

导航