Rate This Document
Findability
Accuracy
Completeness
Readability

Debugging Failure in Attach to Process Mode on Ubuntu

Symptom

In Ubuntu, the attach-to-process debugging task fails to be created when the user of the to-be-debugged node is a common user.

Possible Causes

The common user has insufficient permissions according to the default system configuration.

Procedure

  1. Open the /etc/sysctl.d/10-ptrace.conf file.
    vim /etc/sysctl.d/10-ptrace.conf
  2. Press i to enter the insert mode and modify the file.
    kernel.yama.ptrace_scope = 0
  3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
  4. Restart the procps service.
    service procps restart