Skip to content
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

Support profiling of chrooted processes #750

Open
4 tasks
Jongy opened this issue Mar 28, 2023 · 0 comments
Open
4 tasks

Support profiling of chrooted processes #750

Jongy opened this issue Mar 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Jongy
Copy link
Contributor

Jongy commented Mar 28, 2023

gProfiler makes wide use of /proc/pid/root to access files in the mount namespace of processes.
If a process is chrooted, its /proc/pid/root behaves somewhat differently, breaking our usage. See my note from this py-spy PR:

My understanding is that /proc/pid/root points to the root as the process sees it, while /proc/pid/maps give us paths as WE see it. We (py-spy) are not chrooted when py-spy runs outside the chroot, so we need to strip the chroot from the /proc/pid/maps value. As a generalization, we always strip the path, which in most cases is just / if the process is not chrooted.

Keywords: chrooted chroot

@Jongy Jongy added the enhancement New feature or request label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant