
https://bugzilla.novell.com/show_bug.cgi?id=819383 https://bugzilla.novell.com/show_bug.cgi?id=819383#c17 --- Comment #17 from Mike Galbraith <mgalbraith@suse.com> 2013-07-23 12:55:21 UTC --- (In reply to comment #6)
This happens when PTRACE_DETACH returns ESRCH, which does not make sense, since PTRACE_ATTACH was successful. This is likely a kernel bug.
The reason for that ESRCH return is that while the PTRACE_ATTACH was successful, the tracee is not yet stopped when pldd tries PTRACE_DETACH, and that because pldd does not wait() after the PTRACE_ATTACH. PTRACE_DETACH is expecting tracee->state to be TASK_TRACED, which tracee sets when it executes ptrace_stop(). Adding the wait() after PTRACE_DETACH fixes the problem. The manpage is pretty clear about wait() being required, so I don't think this is a bug, rather a case of proggy shooting self in foot. I sent a query to LKML, let's see what Oleg says. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.