Skip to content

Comments

fix: use readlink(2) instead of realpath(3) to avoid autofs stalls invirtiofs paths#548

Open
Ronitsabhaya75 wants to merge 1 commit intoapple:mainfrom
Ronitsabhaya75:symlink-fix
Open

fix: use readlink(2) instead of realpath(3) to avoid autofs stalls invirtiofs paths#548
Ronitsabhaya75 wants to merge 1 commit intoapple:mainfrom
Ronitsabhaya75:symlink-fix

Conversation

@Ronitsabhaya75
Copy link

When a host directory under /home/<user>/ is bind-mounted into a container, any code that called URL.resolvingSymlinksInPath() on a path inside that directory would stall for 5–10 seconds. macOS intercepts filesystem lookups under /home/ through its autofs automounter when the code tried to resolve a symlink pointing there, macOS would attempt an automount that never succeeds, timing out after 5–10 seconds.

The fix introduces a rawSymlinkTarget() helper on URL that uses readlink(2) directly. This reads only the raw value stored in the symlink inode — no filesystem traversal, no autofs trigger.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant