There is a known problem of using Intel® SDE on Linux* systems that prevents the use of ptrace attach via the sysctl /proc/sys/kernel/yama/ptrace_scope. In this case Pin is not able to use its default (parent) injection mode. (SDE does not need to run as root.)
The following commands disable yama on the system until the next reboot. Add to the init scripts to make permanent.
This command is recommended by the Intel SDE installation guide, but doesn't work on after Ubuntu 14.04 because the directory doesn't exist:
$ echo 0 > /proc/sys/kernel/yama/ptrace_scope
This command does work, most recently verified on Ubuntu 19.04:
$ sudo sysctl -w kernel.yama.ptrace_scope=0
Value | Meaning |
---|---|
0 | All processes can be debugged, as long as they have same uid. This is the classical way of how ptracing worked. |
1 | Only a parent process can be debugged. |
2 | Only admin can use ptrace, as it required CAP_SYS_PTRACE capability. |
3 | No processes may be traced with ptrace. Once set, a reboot is needed to enable ptracing again. |