Show a better error message for mount(2) -> ENOSPC#615
Merged
smcv merged 2 commits intocontainers:mainfrom Jan 29, 2024
Merged
Conversation
This lets die_with_error() reuse it. Signed-off-by: Simon McVittie <[email protected]>
mount(2) uses ENOSPC to represent an arbitrary anti-denial-of-service limit being exceeded, which is outside the usual meaning of "No space left on device". We can make this clearer by catching that particular failure mode and giving users a hint. Reference: https://bugzilla.kernel.org/show_bug.cgi?id=218336 Resolves: ValveSoftware/steam-runtime#637 Signed-off-by: Simon McVittie <[email protected]>
Collaborator
Author
|
(Prior art: https://sourceforge.net/projects/libexplain/, but that doesn't seem to be actively maintained, and doesn't know that mount(2) can fail with ENOSPC.) |
RyuzakiKK
reviewed
Jan 29, 2024
| * errno value to mean something more like "limit exceeded". */ | ||
| return ("Limit exceeded (ENOSPC). " | ||
| "(Hint: Check that /proc/sys/fs/mount-max is sufficient, " | ||
| "typically 100000)"); |
Contributor
There was a problem hiding this comment.
I was unsure if "typically" here meant that the default value was supposed to be 100k or if instead that was a common suggested large enough number to use.
And just FTR, proc(5) says that the former is true. 100k is the default value.
RyuzakiKK
approved these changes
Jan 29, 2024
smcv
added a commit
to smcv/flatpak
that referenced
this pull request
Mar 27, 2024
* `--symlink` is now idempotent, meaning it succeeds if the symlink already exists and already has the desired target (containers/bubblewrap#549, flatpak#2387, flatpak#3477, flatpak#5255) * Report a better error message if `mount(2)` fails with `ENOSPC` (containers/bubblewrap#615, ValveSoftware/steam-runtime#637) * Fix a double-close on error reading from `--args`, `--seccomp` or `--add-seccomp-fd` argument (containers/bubblewrap#558) * Improve memory allocation behaviour (containers/bubblewrap#556, containers/bubblewrap#624) * Silence various compiler warnings (containers/bubblewrap#559) Resolves: flatpak#2387 Resolves: flatpak#3477 Resolves: flatpak#5255 Signed-off-by: Simon McVittie <[email protected]>
smcv
added a commit
to flatpak/flatpak
that referenced
this pull request
Mar 27, 2024
* `--symlink` is now idempotent, meaning it succeeds if the symlink already exists and already has the desired target (containers/bubblewrap#549, #2387, #3477, #5255) * Report a better error message if `mount(2)` fails with `ENOSPC` (containers/bubblewrap#615, ValveSoftware/steam-runtime#637) * Fix a double-close on error reading from `--args`, `--seccomp` or `--add-seccomp-fd` argument (containers/bubblewrap#558) * Improve memory allocation behaviour (containers/bubblewrap#556, containers/bubblewrap#624) * Silence various compiler warnings (containers/bubblewrap#559) Resolves: #2387 Resolves: #3477 Resolves: #5255 Signed-off-by: Simon McVittie <[email protected]>
GeorgesStavracas
pushed a commit
to GeorgesStavracas/flatpak
that referenced
this pull request
Apr 26, 2024
* `--symlink` is now idempotent, meaning it succeeds if the symlink already exists and already has the desired target (containers/bubblewrap#549, flatpak#2387, flatpak#3477, flatpak#5255) * Report a better error message if `mount(2)` fails with `ENOSPC` (containers/bubblewrap#615, ValveSoftware/steam-runtime#637) * Fix a double-close on error reading from `--args`, `--seccomp` or `--add-seccomp-fd` argument (containers/bubblewrap#558) * Improve memory allocation behaviour (containers/bubblewrap#556, containers/bubblewrap#624) * Silence various compiler warnings (containers/bubblewrap#559) Resolves: flatpak#2387 Resolves: flatpak#3477 Resolves: flatpak#5255 Signed-off-by: Simon McVittie <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
utils: Give warnv() the ability to log strerror() or similar
This lets die_with_error() reuse it.
utils: Add a specialized function to print errno for mount(2)
mount(2) uses ENOSPC to represent an arbitrary anti-denial-of-service
limit being exceeded, which is outside the usual meaning of
"No space left on device". We can make this clearer by catching that
particular failure mode and giving users a hint.
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=218336
Resolves: Can't bind mount /oldroot/../SteamLinuxRuntime_sniper/var/.. to /newroot/.. No space left on device ValveSoftware/steam-runtime#637
cc @RyuzakiKK