summaryrefslogtreecommitdiff
path: root/libpackagelistparser/packagelistparser_test.cpp
diff options
context:
space:
mode:
authorAnton Hansson <hansson@google.com>2019-05-31 13:22:34 +0100
committerAnton Hansson <hansson@google.com>2019-05-31 17:06:52 +0100
commit03e31332a38f0f812836bec92dab5fe5f313d48e (patch)
tree0bc834595849992babcfeb386fcf66516b7be942 /libpackagelistparser/packagelistparser_test.cpp
parentfac0bb7a92490b3410f2dab7dc51d05ad3187692 (diff)
Close /dev/fuse FD before calling onClosed
This works around a deadlock when a bridge that is about to be closed is reused for a new call to openFile. The call to open() ends up holding the vold lock, waiting for appfuse to respond. The appfuse event loop calls onClosed(), which ends up calling vold.unmountAppFuse(), which cannot get the lock. Closing this file descriptor causes any current calls to open() on its mount path to fail with either ECONNABORTED or ENOTCONN, allowing the event loop to make progress, call onClosed() and unmount the path. Note that the failed call to open() will result in a retry, which will create a new appfuse bridge. This is not ideal but not a new problem -- the common case here is that that each call to openProxyFileDescriptor creates a new bridge. This should ideally be improved. Bug: 132344997 Test: flick through info of photos with location info attached Change-Id: I878e5cf86f18c5233f8505f52eb9db076bd72d01 Merged-In: I878e5cf86f18c5233f8505f52eb9db076bd72d01
Diffstat (limited to 'libpackagelistparser/packagelistparser_test.cpp')
0 files changed, 0 insertions, 0 deletions