Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_disk: hangs on stale mount points which should be ignored #1975

Open
praffeck opened this issue Dec 14, 2023 · 2 comments
Open

check_disk: hangs on stale mount points which should be ignored #1975

praffeck opened this issue Dec 14, 2023 · 2 comments

Comments

@praffeck
Copy link

Since the update to Debian Bookworm, we're noticing hang-ups of check disk, notably when trying to stat a potentially stale file system mounted by autofs. We know, that these mount points might be stale, so they're ignored both by type (-X) and path (-i).

Unfortunately, the changes introduced by #1820 add calls to statvfs via get_fs_usage to np_set_best_match. When --all is given on the command line, np_set_best_match is called in process_arguments before the path_select_list is filtered with the paths given by -i (or the types given by -X, which happens much later).

Unfortunately, I don't have a solution also addressing the original issue #1819 besides explicitly checking the permissions of the best matches (and searching for a next best match if the permission check fails) after -i is handled. The current state of calling stat on explicitly ignored pathes, however, seems unwanted to me.

@waja waja changed the title check_disk hangs on stale mount points which should be ignored check_disk: hangs on stale mount points which should be ignored Dec 14, 2023
@RincewindsHat
Copy link
Member

Hi @praffeck,
without looking at it, this sounds like a reasonable explanation. I can't promise anything, but I will try to have a look at it and try to think of something which would solve all of the involved concerns.

@gollux
Copy link

gollux commented Apr 29, 2024

The current behavior is very impractical -- check_disk accesses all kinds of filesystems, even though -K or -i is used to exclude them. This leads to lock-ups, for example with inaccessible remote filesystems, and violates reasonable expectations of users.

I suspect that the fix for #1829 brought much worse problems than the original issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants