lkml.org 
[lkml]   [2020]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] Please pull proc and exec work for 5.7-rc1
Linus Torvalds <torvalds@linux-foundation.org> writes:

> On Thu, Apr 9, 2020 at 12:57 PM Bernd Edlinger
> <bernd.edlinger@hotmail.de> wrote:
>>
>> The use case where this may happen with strace
>> when you call strace with lots of -p <pid> arguments,
>> and one of them is a bomb. strace stuck.
>
> Yeah, so from a convenience angle I do agree that it would be nicer to
> just not count dead threads.
>
> You can test that by just moving the
>
> /* Don't bother with already dead threads */
> if (t->exit_state)
> continue;
>
> test in zap_other_threads() to above the
>
> count++;
>
> line instead.

That looks like a legitimate race, and something worth addressing. It
doesn't look like t->exit_state has siglock protection so I don't think
testing it under siglock would fix that race. But something like that
certainly should.

But no. While you are goind a good job at spotting odd corner
cases that need to be fixed. This also is not the cause of the
deadlock. It is nothing that subtle.

Eric

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