Repository navigation
libglnx: Retry openat2 on EAGAIN in glnx_chaseat_full - #6786
Closed
CleoMenezesJr wants to merge 1 commit into
Closed
CleoMenezesJr wants to merge 1 commit into
CleoMenezesJr wants to merge 1 commit into
Conversation
4 tasks done
openat2 with RESOLVE_BENEATH may fail with EAGAIN when a ".." component cannot be resolved without escaping (openat2(2)). Flatpak then aborts the launch with "Extension ... has invalid merge-dirs", which is intermittent since the failure is transient. Retry the call on EAGAIN. Verified against the race: 8 launches, 2 EAGAINs, no crash (previously ~3/5 launches crashed). Closes flatpak#6783 Co-authored-by: Sebastian Wick <[email protected]>
CleoMenezesJr
force-pushed
the
fix-glnx-chaseat-eagain
branch
from
August 18, 2026 17:36
bee3467 to
db79045
Compare
Collaborator
|
libglnx is a subproject. Patch is already up there https://gitlab.gnome.org/GNOME/libglnx/-/merge_requests/79. We need to bump the subproject checkout though when it gets merged in libglnx. |
Collaborator
|
It's actually a git subtree, but same issue... |
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.
openat2 with RESOLVE_BENEATH can fail with EAGAIN when the kernel cannot guarantee that a ".." component did not escape (race condition or potential attack), as documented in openat2(2). Flatpak launches intermittently abort with "Extension ... has invalid merge-dirs" when this happens while opening GL extension merge-dirs.
Retry the syscall on EAGAIN, as suggested by @swick . The race resolves in a few iterations in practice.