Skip to content
Commit 940b34d6 authored by Zim's avatar Zim Committed by android-build-team Robot
Browse files

Decouple FUSE mount from main thread for demo user

Previously, when binding to the FUSE daemon from the system_server, we
depended on the main thread to deliver the service connected
message. The main thread can unfortunately be very delayed from other
services running long tasks. In some cases, we might even have
deadlocks of the following nature:

T1: vold -> storage_manager_service # mount waiting for main thread
task while holding vold lock
T2 (main thread): other_service -> vold # other task blocked on vold
lock while on the main thread.

Now we move the bind callback to a dedicated handler thread. This
allows the vold mount to complete independent of other tasks running
on the system_server main thread.

We also revert the temporary fix to unblock the retail demo use case
that uncovered this deadlock:
I8ff153f2649e3a1d05f2e3e6e382bbba8c79630c

All of this only affects the demo user and is a no-op for other users

Test: Manual
Bug: 161702661
Bug: 162209395
Change-Id: I9b6ccff5705bb78cb1ff7a31e3dd2f26d9b400c6
(cherry picked from commit 0af8530d)
parent 9434252a
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