lkml.org 
[lkml]   [2016]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: strace lockup when tracing exec in go
On Fri 23-09-16 12:21:41, Oleg Nesterov wrote:
> On 09/22, Michal Hocko wrote:
> >
> > --- a/kernel/signal.c
> > +++ b/kernel/signal.c
> > @@ -91,6 +91,10 @@ static int sig_ignored(struct task_struct *t, int sig, bool force)
> > if (!sig_task_ignored(t, sig, force))
> > return 0;
> >
> > + /* Do not ignore signals sent from child to the parent */
> > + if (current->ptrace && current->parent == t)
> > + return 0;
>
> This doesn't look right in general, and this can't really help.
>
> This assumes that the tracer will call do_wait() after mm_access()
> fails, but this is not necessarily true.
>
> Note also ptrace_attach(), -ERESTARTNOINTR means that the tracer won't
> even return to user-space if SIGCHLD is ignored, the tracer will silently
> restart the syscall.

Well, it apparently does help the strace case. So I am not arguing this
is the best fix but can it be harmful?
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2016-09-23 13:19    [W:0.095 / U:3.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site