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.
parent.invalidate()
parent.update()
-
@catch_exceptions
def getattr(self, inode):
if inode not in self.inodes:
return self
def __exit__(self, exc_type, exc_value, traceback):
+ if self.operations.events:
+ self.operations.events.close(timeout=self.args.unmount_timeout)
subprocess.call(["fusermount", "-u", "-z", self.args.mountpoint])
self.llfuse_thread.join(timeout=self.args.unmount_timeout)
if self.llfuse_thread.is_alive():
def tearDown(self):
if self.llfuse_thread:
+ if self.operations.events:
+ self.operations.events.close(timeout=10)
subprocess.call(["fusermount", "-u", "-z", self.mounttmp])
t0 = time.time()
self.llfuse_thread.join(timeout=10)