Bug #11994

[arv-mount] Do not crash if /sys/fs/fuse/connections is empty

Added by Tom Clegg almost 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
FUSE
Target version:
Start date:
07/19/2017
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-

Description

In debian 9 (stretch), due to a systemd-blames-kernel bug, /sys/fs/fuse/connections/ might be empty.

When this occurs, instead of crashing, arv-mount --unmount and friends should print a warning and try the next best thing.

The current behavior is a crash with a stack trace culminating in:

IOError: [Errno 2] No such file or directory: '/sys/fs/fuse/connections/45/abort'

Subtasks

Task #12563: Review 11994-no-sysfs-fuseResolvedPeter Amstutz


Related issues

Related to Arvados - Bug #12306: [arv-mount] --unmount should work on an unresponsive mountResolved09/22/2017

Related to Arvados - Bug #12538: crunch-run failing to terminate after completeResolved11/06/2017

Associated revisions

Revision d493d06b
Added by Tom Clegg over 1 year ago

Merge branch '11994-no-sysfs-fuse'

fixes #11994

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <>

History

#1 Updated by Peter Amstutz over 1 year ago

Instead of crashing, arv-mount --unmount and friends should print a warning and try the next best thing.

I'm not sure what the next best thing is, probably kill -9 arv-mount and then try fusermount -u -z again?

#2 Updated by Tom Clegg over 1 year ago

  • Status changed from New to In Progress
  • Assigned To set to Tom Clegg
  • Target version changed from Arvados Future Sprints to 2017-11-08 Sprint

I'm not sure what the next best thing is, probably kill -9 arv-mount and then try fusermount -u -z again?

Without the sysfs dir, we can't look up the pid, so I don't think we can send a signal with kill either. So just fall through to "fusermount -u -z" and try again, yes.

Turns out the "ignore ENOENT" code has been there since the beginning of unmount.py, but it didn't work because it was looking for OSError instead of IOError.

11994-no-sysfs-fuse @ 4a8561a37ef5878aefc8c5d8c47898a3879a0fda

#3 Updated by Peter Amstutz over 1 year ago

Tom Clegg wrote:

I'm not sure what the next best thing is, probably kill -9 arv-mount and then try fusermount -u -z again?

Without the sysfs dir, we can't look up the pid, so I don't think we can send a signal with kill either. So just fall through to "fusermount -u -z" and try again, yes.

So you don't want to walk the process table and look for an arv-mount with the target path in its arguments? (yes, sort of joking)

Turns out the "ignore ENOENT" code has been there since the beginning of unmount.py, but it didn't work because it was looking for OSError instead of IOError.

11994-no-sysfs-fuse @ 4a8561a37ef5878aefc8c5d8c47898a3879a0fda

LGTM.

#4 Updated by Anonymous over 1 year ago

  • Status changed from In Progress to Resolved

Applied in changeset arvados|commit:d493d06b4b93b87c10c59954e47a18d85db13150.

Also available in: Atom PDF