Increase timeout waiting for ExternalStorageService to bind.
We've observed occasions where it can take a long time for the system_server main thread to come around to handling the bind of the service, for example because it's handling long-running jobs: 06-04 08:19:27.544 1000 1532 1532 W Looper : Slow dispatch took 2044ms main h=com.android.server.job.JobSchedulerService$JobHandler c=null m=1 Delays like this can cause us to fail binding to the external storage service for a user, and reset the whole storage stack, leading to unexpected results, especially if we timed out for trying to mount user 10, while user 0 has already been successfully mounted. Increase the timeout to 20 seconds; this gives us a lot more time to complete the bind. At the same time, we want to avoid risking holding the vold lock for too and/or any deadlocks. Add a WTF for when we do hit the timeout, to get a better grasp on how common this is. Bug: 158452122 Test: Boot device Change-Id: Ia8f6f121448f6b5e484fd3e8cca845fdd89afc23
Loading
Please register or sign in to comment