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

parca-agent not able to find binaries which chroot to a non-/ mount #2841

Open
axinojolais opened this issue Jun 3, 2024 · 2 comments
Open

Comments

@axinojolais
Copy link

Describe the bug
Logs flooded with :

parca-agent.parca-agent-svc[49385]: level=warn name=parca-agent ts=2024-06-03T09:22:20.712072211Z caller=cpu.go:719 component=cpu_profiler msg="failed to add unwind table" pid=50350 err="failed to prefetch process info: failed to get executable object file for /proc/50350/root/usr/bin/rsync: error opening /proc/50350/root/usr/bin/rsync: open /proc/50350/root/usr/bin/rsync: no such file or directory"

I suspect this is because rsync chroots to a mounted filesystem which is not /, and so /proc/pid/root does not point at /

To Reproduce
Try to profile any daemon that chroots. rsyncd tries to chroot by default to the path given in the config stanza, if any.

Expected behavior
parca-agent can find the binary

Software (please complete the following information):

  • Parca Agent Version: parca-agent, version 0.30.0 (commit: da59a7c04e2e9ee29fe5871a0fd2d2964a7701cc, date: 2024-03-04T20:55:59Z), arch: amd64 (latest/edge snap)

Environment (please complete the following information):

  • Linux Distribution: Ubuntu 22.04
  • Linux Version: Ubuntu 6.5.0-15-generic
  • Arch: x86_64
@jnsgruk
Copy link
Contributor

jnsgruk commented Jun 21, 2024

Hey @axinojolais - sorry for the late reply on this one. I can see you're running the snap, but I don't think that's actually causing the problem.

To confirm, could you try downloading and running the upstream parca-binary and just see if you get the same issue?

@dyumin
Copy link

dyumin commented Oct 24, 2024

I have similar problem.
parca was unable to symbolize haproxy running with chroot /var/empty

parca-agent[1025061]: level=debug name=parca-agent ts=2024-10-24T14:53:29.807803765Z caller=cpu.go:414 component=cpu_profiler msg="failed to prefetch process info" pid=1031735 err="failed to get executable object file for /proc/1031735/root/opt/hapee-2.6/sbin/hapee-lb: error opening /proc/1031735/root/opt/hapee-2.6/sbin/hapee-lb: open /proc/1031735/root/opt/hapee-2.6/sbin/hapee-lb: no such file or directory"

parca-agent[1025061]: level=debug name=parca-agent ts=2024-10-24T14:53:28.859538512Z caller=cpu.go:399 component=cpu_profiler msg="failed to add unwind table due to a procfs race" pid=1031735 err="setUnwindTableForMapping for executable /opt/hapee-2.6/sbin/hapee-lb starting at 0x560f38d58fdc failed: open /proc/1031735/root/opt/hapee-2.6/sbin/hapee-lb: no such file or directory"

parca-agent[1025061]: level=debug name=parca-agent ts=2024-10-24T14:53:28.857271022Z caller=cpu.go:377 component=cpu_profiler msg="failed to fetch process info" pid=1031735 err="failed to get executable object file for /proc/1031735/root/opt/hapee-2.6/sbin/hapee-lb: error opening /proc/1031735/root/opt/hapee-2.6/sbin/hapee-lb: open /proc/1031735/root/opt/hapee-2.6/sbin/hapee-lb: no such file or directory"

parca-agent[1025061]: level=debug name=parca-agent ts=2024-10-24T14:53:28.380460363Z caller=cpu.go:768 component=cpu_profiler msg="failed to get process info" pid=1031735 err="failed to get executable object file for /proc/1031735/root/opt/hapee-2.6/sbin/hapee-lb: error opening /proc/1031735/root/opt/hapee-2.6/sbin/hapee-lb: open /proc/1031735/root/opt/hapee-2.6/sbin/hapee-lb: no such file or directory"

after disabling chroot everything worked fine

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

No branches or pull requests

3 participants