Skip to content

Support profiling of chrooted processes #750

@Jongy

Description

@Jongy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions