-
Notifications
You must be signed in to change notification settings - Fork 238
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
Show a better error message for mount(2) -> ENOSPC #615
Conversation
This lets die_with_error() reuse it. Signed-off-by: Simon McVittie <smcv@collabora.com>
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 <smcv@collabora.com>
(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.) |
* 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)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a maintainer, but looks good to me.
* `--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 <smcv@collabora.com>
* `--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 <smcv@collabora.com>
* `--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 <smcv@collabora.com>
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