8460: Fix deadlock at shutdown by closing event stream before unmounting.
authorTom Clegg <tom@curoverse.com>
Tue, 13 Dec 2016 17:46:02 +0000 (12:46 -0500)
committerTom Clegg <tom@curoverse.com>
Tue, 13 Dec 2016 17:46:02 +0000 (12:46 -0500)
commit62d8f575a93374a235097b88499fa65eef2f56ec
tree401c69162f24635fe6b14dbd486e1e4d4bc9f58d
parentba1ec0f0b59ab871b6e4faf5e8ae87809fdb85b6
8460: Fix deadlock at shutdown by closing event stream before unmounting.

If llfuse shuts down while a thread is in a "with
llfuse.lock_released" block, the llfuse lock cannot be reacquired, so
the "with" block waits forever instead of exiting. The event listener
thread lands in this state easily because handling a "collection
updated" event makes network requests in a lock_released block.

This deadlock bug started occurring frequently in
tests.test_token_expiry.TokenExpiryTest when using arvados-ws.
services/fuse/arvados_fuse/__init__.py
services/fuse/arvados_fuse/command.py
services/fuse/tests/mount_test_base.py