From: Al Viro <viro@ZenIV.linux.org.uk>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Oleg Nesterov <oleg@redhat.com>,
Sasha Levin <sasha.levin@oracle.com>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
mingo@kernel.org
Subject: Re: [PATCH] signals: work around random wakeups in sigsuspend()
Date: Thu, 25 Feb 2016 17:34:23 +0000 [thread overview]
Message-ID: <20160225173423.GY17997@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20160225081144.GX6357@twins.programming.kicks-ass.net>
On Thu, Feb 25, 2016 at 09:11:44AM +0100, Peter Zijlstra wrote:
> > Out of curiousity - where did that stray wakeup come from? PTRACE_KILL
> > used to trigger those, but that got fixed. How does one trigger that
> > kind of bugs on the current kernels?
>
> Its a regular TASK_INTERRUPTIBLE sleep, for those spurious wakeups are
> not a bug, they're pretty fundamentally allowed.
They are, which makes any code that doesn't expect them in such situations
buggy.
> See: lkml.kernel.org/r/CA+55aFwHkOo+YGWKYROmce1-H_uG3KfEUmCkJUerTj=ojY2H6Q@mail.gmail.com
I know. The question is not whether the code must take them into account
(it must; it's a bug not to), it's what's a good way to trigger such bugs.
IOW, how to stress-test for such bugs?
PTRACE_KILL used to be a convenient way to arrange for a wakeup delivered
to victim engaged in something we want to stress; it doesn't do blind
wake_up_process() anymore, so that trick is gone. Is there anything
similar?
Suppose I have a dodgy waitqueue code (pardon the redundancy) in some
filesystem. I have some idea how to maneuver a process into such-and-such
part of that code; is there any convenient way to turn that into "... OK,
now let's add bombing it with stray wakeups"?
next prev parent reply other threads:[~2016-02-25 17:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 15:21 [PATCH] signals: work around random wakeups in sigsuspend() Sasha Levin
2016-01-25 19:09 ` Oleg Nesterov
2016-01-25 19:37 ` Peter Zijlstra
2016-02-25 3:18 ` Al Viro
2016-02-25 8:11 ` Peter Zijlstra
2016-02-25 17:34 ` Al Viro [this message]
2016-01-25 21:32 ` Andrew Morton
2016-01-26 21:10 ` Oleg Nesterov
2016-01-27 8:44 ` Peter Zijlstra
2016-01-27 16:41 ` Oleg Nesterov
2016-01-27 17:54 ` Peter Zijlstra
2016-01-27 18:39 ` Andrew Morton
2016-01-27 21:07 ` Oleg Nesterov
2016-01-27 17:24 ` Sasha Levin
2016-01-26 6:44 ` Ingo Molnar
2016-01-26 15:05 ` Oleg Nesterov
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=20160225173423.GY17997@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=sasha.levin@oracle.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.