From: david singleton <dsingleton@mvista.com>
To: Esben Nielsen <simlo@phys.au.dk>
Cc: <dino@in.ibm.com>, <robustmutexes@lists.osdl.org>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: robust futex deadlock detection patch
Date: Fri, 6 Jan 2006 18:40:09 -0800 [thread overview]
Message-ID: <EB15893A-7F26-11DA-9F72-000A959BB91E@mvista.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0601051820000.3110-100000@lifa02.phys.au.dk>
Here is a new patch that provides both futex deadlock detection and
prevents ill-behaved and
malicious apps from deadlocking the kernel through the robust futex
interface.
http://source.mvista.com/~dsingleton/patch-2.6.15-rt2-rf1
Deadlock detection is done 'up front' for both POSIX and robust
pthread_mutexes. Non-recursive
POSIX mutexes will hang if deadlocked, as defined by the POSIX spec.
The wait channel they
are hung on is 'futex_deadlock'. This wait channel makes it easy to
spot that your POSIX app
has deadlocked itself via the 'ps' command.
Robust futexes will have -EDEADLK returned to them since there is no
POSIX specification for
robust mutexes, yet, and returning -EDEADLK is more in the spirit of
robustness. Robust
mutexes are cleaned up by the kernel after a thread dies and they also
report to the app if
it is deadlocking itself.
Deadlock detection is something I have wanted to provide for both debug
and production kernels
for a while. It was previously available through DEBUG_DEADLOCKS. I
needed to add the
deadlock dection code for both production and debug kernels to prevent
applications hanging
the kernel.
David
next prev parent reply other threads:[~2006-01-07 2:40 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-14 22:39 Recursion bug in -rt Dinakar Guniguntala
2005-12-15 1:03 ` david singleton
2005-12-15 19:44 ` Dinakar Guniguntala
2005-12-15 20:40 ` David Singleton
2005-12-16 0:02 ` david singleton
2005-12-16 18:42 ` Dinakar Guniguntala
2005-12-16 21:26 ` David Singleton
2005-12-19 11:56 ` Dinakar Guniguntala
2005-12-19 20:11 ` David Singleton
2005-12-15 19:00 ` David Singleton
2005-12-15 19:52 ` Dinakar Guniguntala
2005-12-20 13:19 ` Ingo Molnar
2005-12-20 15:50 ` Dinakar Guniguntala
2005-12-20 17:43 ` Esben Nielsen
2005-12-20 19:33 ` Steven Rostedt
2005-12-20 20:42 ` Esben Nielsen
2005-12-20 21:20 ` Steven Rostedt
2005-12-20 21:55 ` david singleton
2005-12-20 22:56 ` Esben Nielsen
2005-12-20 23:12 ` Steven Rostedt
2005-12-20 23:55 ` Esben Nielsen
2005-12-22 4:37 ` david singleton
2005-12-20 22:43 ` Esben Nielsen
2005-12-20 22:59 ` Steven Rostedt
2006-01-03 1:54 ` david singleton
2006-01-05 2:14 ` david singleton
2006-01-05 9:43 ` Esben Nielsen
2006-01-05 17:11 ` david singleton
2006-01-05 17:47 ` Esben Nielsen
2006-01-05 18:26 ` david singleton
2006-01-07 2:40 ` david singleton [this message]
[not found] ` <a36005b50601071145y7e2ead9an4a4ca7896f35a85e@mail.gmail.com>
2006-01-07 19:49 ` robust futex deadlock detection patch Ulrich Drepper
2006-01-09 9:23 ` Esben Nielsen
2006-01-09 20:01 ` David Singleton
2006-01-09 20:16 ` Esben Nielsen
2006-01-09 21:08 ` Steven Rostedt
2006-01-09 21:19 ` Esben Nielsen
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=EB15893A-7F26-11DA-9F72-000A959BB91E@mvista.com \
--to=dsingleton@mvista.com \
--cc=dino@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=robustmutexes@lists.osdl.org \
--cc=simlo@phys.au.dk \
/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;
as well as URLs for NNTP newsgroup(s).