Re: attaching a process in eclipse

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: attaching a process in eclipse
Дата
Msg-id 549FE154.8050602@2ndquadrant.com
обсуждение исходный текст
Ответ на attaching a process in eclipse  (Ravi Kiran <ravi.kolanpaka@gmail.com>)
Список pgsql-hackers
On 12/28/2014 06:37 PM, Ravi Kiran wrote:
> 
> "Could not attach to process.  If your uid matches the uid of the target
> process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
> again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf"
> 
> how do we rectify this error?

At a guess, the PostgreSQL you are trying to attach to is not running
under the same user account as Eclipse.

The Linux kernel only permits you to attach to a process with the same
user account as you by default, unless you are the root user. That's
what "if your uid matches the uid of the target process" refers to.

You'll have the same issue when attaching using gdb directly, this isn't
an Eclipse issue.

If you were debugging manually with gdb you'd often do something like
   sudo -u postgres gdb -p thepid

to run gdb as the same user id as the target process. (Avoid running gdb
as root whenever possible). Perhaps Eclipse lets you configure a prefix
command for gdb so you can do that with Eclipse and passwordless sudo?

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ravi Kiran
Дата:
Сообщение: attaching a process in eclipse
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: attaching a process in eclipse