0

The version of pin I'm using is 3.22 and the OS is ubuntu 22. I have started some docker containers with docker compose with cap_add=SYS_PTRACE. I got the process ID 4645 of the container by "docker top":

$ docker top geo
UID                 PID                 PPID                C                   STIME               TTY                 TIME                CMD
root                4645                4623                0                   03:38               ?                   00:00:00            /app/server --url=0.0.0.0 --port=8083 --db_addr=database:27017

I can use intel pin to attach to some other processesm but it doesn't work when I try to attach to the docker prcoess and the error was "permission denied":

$ $PIN_ROOT/pin -pid 4645 -t ./obj-intel64/champsim_tracer.so -o ./traces/test.champsim
E: Could not attach to process 4645: need execute and read access to /proc/4645/exe, errno=Permission denied

Also, /proc/sys/kernel/yama/ptrace_scope is already set to 0, is there anything I missed to make pin work?

I have set /proc/sys/kernel/yama/ptrace_scope to 0, and add cap_add=SYS_PTRACE to the yaml file.

0 Answers0