Re: Unkillable processes due to PTRACE_TRACEME again

2016-12-05 Thread Oleg Nesterov
On 12/05, Dmitry Vyukov wrote: > > On Mon, Dec 5, 2016 at 12:00 PM, Oleg Nesterov wrote: > > On 12/05, Oleg Nesterov wrote: > >> > >> On 12/02, Dmitry Vyukov wrote: > >> > > >> > I am not on 2caceb3294a78c389b462e7e236a4e744a53a474 (Dec 1). And see > >> > the same unwaitable zombie processes. > >>

Re: Unkillable processes due to PTRACE_TRACEME again

2016-12-05 Thread Dmitry Vyukov
On Mon, Dec 5, 2016 at 12:00 PM, Oleg Nesterov wrote: > On 12/05, Oleg Nesterov wrote: >> >> On 12/02, Dmitry Vyukov wrote: >> > >> > I am not on 2caceb3294a78c389b462e7e236a4e744a53a474 (Dec 1). And see >> > the same unwaitable zombie processes. >> >> This is another thing, and notabug. This is h

Re: Unkillable processes due to PTRACE_TRACEME again

2016-12-05 Thread Oleg Nesterov
On 12/05, Oleg Nesterov wrote: > > On 12/02, Dmitry Vyukov wrote: > > > > I am not on 2caceb3294a78c389b462e7e236a4e744a53a474 (Dec 1). And see > > the same unwaitable zombie processes. > > This is another thing, and notabug. This is how ptrace works, > > > void *thr(void *arg) > > { > > ptrace(P

Re: Unkillable processes due to PTRACE_TRACEME again

2016-12-05 Thread Oleg Nesterov
On 12/02, Dmitry Vyukov wrote: > > I am not on 2caceb3294a78c389b462e7e236a4e744a53a474 (Dec 1). And see > the same unwaitable zombie processes. This is another thing, and notabug. This is how ptrace works, > void *thr(void *arg) > { > ptrace(PTRACE_TRACEME, 0, 0, 0); > } > > int main() > { >

Re: Unkillable processes due to PTRACE_TRACEME again

2016-12-03 Thread Pavel Machek
Hi! You cc-ed me on initial mail, I replied, and you removed me from cc. Ouch. On Sat 2016-12-03 16:55:49, Dmitry Vyukov wrote: > On Fri, Dec 2, 2016 at 10:02 PM, Pavel Machek wrote: > > On Fri 2016-12-02 19:48:40, Dmitry Vyukov wrote: > >> Hello, > >> > >> There was an issue discussed a year ag

Re: Unkillable processes due to PTRACE_TRACEME again

2016-12-03 Thread Dmitry Vyukov
On Fri, Dec 2, 2016 at 10:02 PM, Pavel Machek wrote: > On Fri 2016-12-02 19:48:40, Dmitry Vyukov wrote: >> Hello, >> >> There was an issue discussed a year ago which leads to >> unkillalble/unwaitable zombie processes due to PTRACE_TRACEME: >> https://groups.google.com/d/msg/syzkaller/uGzwvhlCXAw/

Re: Unkillable processes due to PTRACE_TRACEME again

2016-12-02 Thread Pavel Machek
On Fri 2016-12-02 19:48:40, Dmitry Vyukov wrote: > Hello, > > There was an issue discussed a year ago which leads to > unkillalble/unwaitable zombie processes due to PTRACE_TRACEME: > https://groups.google.com/d/msg/syzkaller/uGzwvhlCXAw/E-cfY2ejAgAJ > and I though it has been fixed by "wait/ptrac

Unkillable processes due to PTRACE_TRACEME again

2016-12-02 Thread Dmitry Vyukov
Hello, There was an issue discussed a year ago which leads to unkillalble/unwaitable zombie processes due to PTRACE_TRACEME: https://groups.google.com/d/msg/syzkaller/uGzwvhlCXAw/E-cfY2ejAgAJ and I though it has been fixed by "wait/ptrace: assume __WALL if the child is traced": https://groups.goog

Re: Unkillable processes due to PTRACE_TRACEME

2015-12-04 Thread Oleg Nesterov
Hi Pavel, On 12/03, Pavel Machek wrote: > > > You can't. This is one of historical oddities. You need to reap the > > traced sub-thread first. And PTRACE_DETACH doesn't work. > > If kill -9 does not take out the process, Just in case, "kill -9" can't help because the task is already killed and zo

Re: Unkillable processes due to PTRACE_TRACEME

2015-12-03 Thread Pavel Machek
Hi! > > >> waitid(P_ALL, 0, {}, WNOHANG|WEXITED|WSTOPPED|WCONTINUED, NULL) = 0 > > >> > > >> So what should be fixed here? Kernel of distro init? > > > > > > waitpid(__WALL) indeed joins these processes. > > Thanks. And I just checked Fedora 22, it doesn't use __WALL too. > > So I think we shoul

Re: Unkillable processes due to PTRACE_TRACEME

2015-10-20 Thread Oleg Nesterov
On 10/20, Dmitry Vyukov wrote: > > On Tue, Oct 20, 2015 at 10:34 AM, Dmitry Vyukov wrote: > > On Mon, Oct 19, 2015 at 10:17 PM, Dmitry Vyukov wrote: > >> On Mon, Oct 19, 2015 at 9:49 PM, Oleg Nesterov wrote: > >>> > >>> So I bet the problem is that your /sbin/init doesn't use __WALL, > >>> so wa

Re: Unkillable processes due to PTRACE_TRACEME

2015-10-20 Thread Dmitry Vyukov
On Tue, Oct 20, 2015 at 10:34 AM, Dmitry Vyukov wrote: > On Mon, Oct 19, 2015 at 10:17 PM, Dmitry Vyukov wrote: >> On Mon, Oct 19, 2015 at 9:49 PM, Oleg Nesterov wrote: >>> On 10/19, Dmitry Vyukov wrote: The following program hangs in some interesting state and is not killable (st

Re: Unkillable processes due to PTRACE_TRACEME

2015-10-20 Thread Dmitry Vyukov
On Mon, Oct 19, 2015 at 10:17 PM, Dmitry Vyukov wrote: > On Mon, Oct 19, 2015 at 9:49 PM, Oleg Nesterov wrote: >> On 10/19, Dmitry Vyukov wrote: >>> >>> The following program hangs in some interesting state and is not >>> killable (started by a normal user, not root): >> >> Thanks. >> >>> #includ

Re: Unkillable processes due to PTRACE_TRACEME

2015-10-19 Thread Dmitry Vyukov
On Mon, Oct 19, 2015 at 9:49 PM, Oleg Nesterov wrote: > On 10/19, Dmitry Vyukov wrote: >> >> The following program hangs in some interesting state and is not >> killable (started by a normal user, not root): > > Thanks. > >> #include >> #include >> #include >> #include >> #include >> >> void

Re: Unkillable processes due to PTRACE_TRACEME

2015-10-19 Thread Oleg Nesterov
On 10/19, Dmitry Vyukov wrote: > > The following program hangs in some interesting state and is not > killable (started by a normal user, not root): Thanks. > #include > #include > #include > #include > #include > > void *thr(void *arg) { > ptrace(PTRACE_TRACEME, 0, 0, 0); >

Unkillable processes due to PTRACE_TRACEME

2015-10-19 Thread Dmitry Vyukov
Hello, The following program hangs in some interesting state and is not killable (started by a normal user, not root): // autogenerated by syzkaller (http://github.com/google/syzkaller) #include #include #include #include #include void *thr(void *arg) { ptrace(PTRACE_TRACEME, 0, 0,