From 7e7ada63bca240416584871398076c1bafc90f76 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Wed, 19 Jul 2017 16:15:17 -0400 Subject: [PATCH] 10805: Fix crash during shutdown when running with llfuse 1.x. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- services/fuse/arvados_fuse/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py index 1bfd517798..a43a556866 100644 --- a/services/fuse/arvados_fuse/__init__.py +++ b/services/fuse/arvados_fuse/__init__.py @@ -85,6 +85,8 @@ else: # llfuse >= 0.42 llfuse._notify_queue = Queue.Queue() +LLFUSE_VERSION_0 = llfuse.__version__.startswith('0') + from fusedir import sanitize_filename, Directory, CollectionDirectory, TmpCollectionDirectory, MagicDirectory, TagsDirectory, ProjectDirectory, SharedDirectory, CollectionDirectoryBase from fusefile import StringFile, FuseArvadosFile @@ -371,7 +373,9 @@ class Operations(llfuse.Operations): self.events.close() self.events = None - if llfuse.lock.acquire(): + # Different versions of llfuse require and forbid us to + # acquire the lock here. See #8345#note-37, #10805#note-9. + if LLFUSE_VERSION_0 and llfuse.lock.acquire(): # llfuse < 0.42 self.inodes.clear() llfuse.lock.release() -- 2.30.2