Skip to content
Commit 10e5eeb6 authored by luozhanwei's avatar luozhanwei
Browse files

[DeadLock]AMS PMS MountService



Umount externel srotage when phone boot.
It  may trigger below dead lock in system_server in the board with external adoptable storage
as below stack:

"Binder_6" prio=5 tid=57 Blocked
  | group="main" sCount=1 dsCount=0 obj=0x12fa7fa0 self=0x7f9674d000
  | sysTid=3218 nice=0 cgrp=default sched=0/0 handle=0x7f941a3440
  | state=S schedstat=( 450091692 353243785 1757 ) utm=30 stm=15 core=8 HZ=100
  | stack=0x7f940a7000-0x7f940a9000 stackSize=1013KB
  | held mutexes=
  at com.android.server.MountService.getVolumeList(MountService.java:3014)
  - waiting to lock <0x064315bf> (a java.lang.Object) held by thread 14                                        B
  at android.os.storage.StorageManager.getVolumeList(StorageManager.java:918)
  at android.os.storage.StorageManager.getStorageVolume(StorageManager.java:853)
  at android.os.Environment.isExternalStorageEmulated(Environment.java:742)
  at android.os.Environment.isExternalStorageEmulated(Environment.java:730)
  at com.android.server.pm.PackageManagerService.isExternalMediaAvailable(PackageManagerService.java:10378)
  at com.android.server.pm.PackageManagerService.nextPackageToClean(PackageManagerService.java:10385)
  - locked <0x05b654c7> (a android.util.ArrayMap)                                                              A
  at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:1636)
  at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:2937)
  at android.os.Binder.execTransact(Binder.java:458)

"android.fg" prio=5 tid=14 Blocked
  | group="main" sCount=1 dsCount=0 obj=0x12da1f90 self=0x7fa9ad8800
  | sysTid=1792 nice=0 cgrp=default sched=0/0 handle=0x7f9867f440
  | state=S schedstat=( 79482537 29476078 684 ) utm=4 stm=4 core=5 HZ=100
  | stack=0x7f9857d000-0x7f9857f000 stackSize=1037KB
  | held mutexes=
  at com.android.server.am.ActivityManagerService.broadcastIntent(ActivityManagerService.java:19159)
  - waiting to lock <0x074b3319> (a com.android.server.am.ActivityManagerService) held by thread 98           C
  at android.app.ContextImpl.sendBroadcastAsUser(ContextImpl.java:942)
  at com.android.server.MountService.onVolumeStateChangedLocked(MountService.java:1424)
  at com.android.server.MountService.onEventLocked(MountService.java:1134)
  at com.android.server.MountService.onEvent(MountService.java:1039)
  - locked <0x064315bf> (a java.lang.Object)                                                                  B
  at com.android.server.NativeDaemonConnector.handleMessage(NativeDaemonConnector.java:135)
  at android.os.Handler.dispatchMessage(Handler.java:107)
  at android.os.Looper.loop(Looper.java:207)
  at android.os.HandlerThread.run(HandlerThread.java:61)
  at com.android.server.ServiceThread.run(ServiceThread.java:46)

"Binder_F" prio=5 tid=98 Blocked
  | group="main" sCount=1 dsCount=0 obj=0x13f740a0 self=0x7f96ab6400
  | sysTid=3483 nice=0 cgrp=default sched=0/0 handle=0x7f8dbb7440
  | state=S schedstat=( 472520780 311910624 1572 ) utm=35 stm=12 core=6 HZ=100
  | stack=0x7f8dabb000-0x7f8dabd000 stackSize=1013KB
  | held mutexes=
  at com.android.server.pm.PackageManagerService.queryContentProviders(PackageManagerService.java:5974)
  - waiting to lock <0x05b654c7> (a android.util.ArrayMap) held by thread 57                                   A
  at com.android.server.am.ActivityManagerService.generateApplicationProvidersLocked(ActivityManagerService.java:10786)
  at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:7405)
  at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:7577)
  - locked <0x074b3319> (a com.android.server.am.ActivityManagerService)                                       C
  at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:513)
  at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2764)
  at android.os.Binder.execTransact(Binder.java:458)

Change-Id: Iec16ae1353cba7879838e3116d50f7cdeaee285c
Signed-off-by: default avatarluozhanwei <luozhanwei@xiaomi.com>
parent cdb84d2f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment