-
Notifications
You must be signed in to change notification settings - Fork 1k
Use /proc/self instead of /proc/<pid> in getOpenedPath #1322
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
base: main
Are you sure you want to change the base?
Conversation
|
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D89913463. (Because this pull request was imported automatically, there will not be any future comments.) |
|
@ptarjan has updated the pull request. You must reimport the pull request before landing. |
47d6bdd to
d6a0213
Compare
|
@ptarjan has updated the pull request. You must reimport the pull request before landing. |
a78cbe5 to
d6a0213
Compare
I'm doing this to re-run the flaky test |
|
@ptarjan has updated the pull request. You must reimport the pull request before landing. |
1 similar comment
|
@ptarjan has updated the pull request. You must reimport the pull request before landing. |
47b33ef to
d6a0213
Compare
Simplify the procfs path construction by using /proc/self which is a symlink to the current process's directory, avoiding the need to call folly::get_cached_pid(). This also removes the now-unused Pid.h include.
d6a0213 to
aeb760a
Compare
|
@ptarjan has updated the pull request. You must reimport the pull request before landing. |
|
I'm giving up on CI. It is failing on |
When running in a PID namespace (common in containers), watchman fails
with "need /proc to be mounted!" because it accesses /proc//fd/X
using the namespace PID, but /proc may be mounted from the host with
different PID numbering.
The fix is to use /proc/self/fd/X instead of /proc/<getpid()>/fd/X
when resolving file descriptor paths. The /proc/self symlink is always
resolved by the kernel to the current process's /proc entry, regardless
of PID namespace boundaries.
This issue manifests when:
Error seen:
getOpenedPath: need /proc to be mounted!: Function not implemented
Affected platforms: Linux containers with PID namespace isolation