From: Rik van Riel <riel@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
Sasha Levin <sasha.levin@oracle.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH] sched: remove false-positive warning from wake_up_process()
Date: Mon, 30 Nov 2015 21:48:40 -0500 [thread overview]
Message-ID: <565D0A88.5060902@redhat.com> (raw)
In-Reply-To: <CA+55aFwKUJPh8NH9dHQwTLUkW=yN-=XYjUA46GO3pT-rjvExvA@mail.gmail.com>
On 11/30/2015 08:47 PM, Linus Torvalds wrote:
> On Mon, Nov 30, 2015 at 5:34 PM, Sasha Levin <sasha.levin@oracle.com> wrote:
>> Futex can have a spurious wake up before we actually wake it up on our own,
>> which will trigger this warning if the task is still stopped.
>
> Actually, I think it would presumably be the other way around: a
> spurious stale futex wakeup happens *after* the process has been woken
> up for some other reason and moved to stopped state.
>
> (The "wake up and move to stopped state" could be for the same reason:
> a SIGSTOP signal).
>
> So the setup is presumably something like this:
>
> - on cpu1: futex code is about to go to sleep, adds itself to the
> futex hash chains, but then gets interrupted by a SIGSTOP
>
> - in the meantime, on cpu2, the futex is changed, and the wakup code
> sees the process from cpu1 on the futex hash chains
>
> - on cpu1, the process has now removed itself from the hash chains,
> and goes through the signal code that sets the state to STOPPED
>
> - in the meantime, on cpu2, the futex code now gets around to waking
> things up, and sees that stopped state
>
> Roughly.
What would the correct behaviour in that case be?
Does waking up the task while it is being traced, and ptrace
(or gdb) is not expecting a wakeup, break the tracing?
--
All rights reversed
next prev parent reply other threads:[~2015-12-01 2:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-01 1:34 [PATCH] sched: remove false-positive warning from wake_up_process() Sasha Levin
2015-12-01 1:47 ` Linus Torvalds
2015-12-01 2:48 ` Rik van Riel [this message]
2015-12-01 3:14 ` Linus Torvalds
2015-12-03 12:36 ` Peter Zijlstra
2015-12-03 18:18 ` Linus Torvalds
2015-12-04 11:52 ` [tip:locking/core] sched/core: Remove " tip-bot for Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=565D0A88.5060902@redhat.com \
--to=riel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=sasha.levin@oracle.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox