[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR03MB5170E360AE2E27F632874DAEE4DF0@AM6PR03MB5170.eurprd03.prod.outlook.com>
Date: Sat, 11 Apr 2020 23:16:11 +0200
From: Bernd Edlinger <bernd.edlinger@...mail.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Oleg Nesterov <oleg@...hat.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Waiman Long <longman@...hat.com>,
Ingo Molnar <mingo@...nel.org>, Will Deacon <will@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Alexey Gladkov <gladkov.alexey@...il.com>
Subject: Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1
On 4/11/20 10:07 PM, Linus Torvalds wrote:
> On Sat, Apr 11, 2020 at 12:15 PM Bernd Edlinger
> <bernd.edlinger@...mail.de> wrote:
>>
>> But won't the dead thread's lifetime overlap the new thread's lifetime
>> from the tracer's POV?
>
> What new thread?
>
> execve() doesn't create any new thread.
>
> But yes, an external tracer could see the (old) thread that did
> execve() do new system calls before it sees the (other old) thread
> that was a zombie.
>
That is an api change. Previously the strace could rely that there
is a callback at the end of the execve and that all previous threads
are de-zombiefied and waited for.
Then there is a execve done event.
And then the old thread continues to run but executing the new program.
I'd bet the strace test suite has tests for that order of events,
or at least it should.
> But that is already somethign that can happen, simply because the
> events aren't ordered. The whole issue is that the zombie thread
> already died, but the tracer just didn't bother to read that state
> change.
What causes the deadlock is that de_thread waits for the tracer to
wait on the threads. If that changes something will break in the
user space. Of course you could say, I did not say "Simon says".
Bernd.
>
> So it's not that the dead thread somehow _dies_ after the execve(). It
> already died.
>
> It's just that whoever is to reap it (or traces it) just hasn't cared
> to read the status of that thing yet.
>
> Linus
>
Powered by blists - more mailing lists