Hi, thanks for blazesym.
I'm using it to symbolize processes from a profiler that runs as a sidecar container. To see processes in sibling containers it needs the host's /proc, so we bind-mount the host /proc over the container's own /proc. That works great.
The snag is that the same container also has other code reading its own /proc/self (via gopsutil), and that code uses the container-namespace PID. Once /proc is the host's, it looks up the wrong PID (or one that isn't there) and crashes on startup.
If blazesym could read /proc from somewhere else, say /host/proc, we'd be fine: mount the host /proc there and leave the container's /proc alone. Right now it looks hardcoded:
- src/maps.rs:389 -> format!("/proc/{pid}/maps")
- src/maps.rs:213 -> format!("/proc/{pid}/map_files/...")
Two questions:
- Is there already a way to point blazesym at a different /proc root that I missed?
- If not, would you take a PR for it? I'm thinking an optional proc-root on the Process source, defaulting to /proc.
Thanks!
Hi, thanks for blazesym.
I'm using it to symbolize processes from a profiler that runs as a sidecar container. To see processes in sibling containers it needs the host's /proc, so we bind-mount the host /proc over the container's own /proc. That works great.
The snag is that the same container also has other code reading its own /proc/self (via gopsutil), and that code uses the container-namespace PID. Once /proc is the host's, it looks up the wrong PID (or one that isn't there) and crashes on startup.
If blazesym could read /proc from somewhere else, say /host/proc, we'd be fine: mount the host /proc there and leave the container's /proc alone. Right now it looks hardcoded:
Two questions:
Thanks!