Deadlock immunity is a property by which programs, once afflicted
by a deadlock pattern, develop the ability to avoid future occurrences
of that deadlock pattern. Over time, programs with such an "immune
system" progressively increase their resistance to deadlocks.
Dimmunix is a tool developed in the Dependable Systems Lab at EPFL for
giving software systems such an immune system against deadlock,
without any assistance from programmers or users. Dimmunix is well
suited for general purpose software (desktop and enterprise
applications, server software, etc.) but not yet suited for real-time or
safety-critical systems.
Dimmunix is available for the following platforms:
We have used Dimmunix on real systems (JBoss, MySQL, ActiveMQ, Apache
httpd, MySQL JDBC, Java JDK, Limewire). Dimmunix has proven effective
in avoiding real, reported deadlock bugs (e.g.,
AMQ-336,
MS-14972,
MS-17709,
LWC-1449),
while introducing only modest performance overhead (up to 4.5% on a
lock-intensive microbenchmark with 1,024 threads, 2.6% in JBoss, 7.17%
in MySQL JDBC, etc.). We are working on more deadlock bugs, but the
main challenge is reproducing them -- this takes a lot of time and
patience.
People
Publications
- Deadlock Immunity: Enabling Systems To Defend Against Deadlocks, Horatiu Jula, Daniel Tralamazza, Cristian Zamfir, and George Candea, appears in Proc. 8th USENIX Symposium on Operating Systems Design and Implementation (OSDI), San Diego, CA (December 2008).
- A Scalable, Sound, Eventually-Complete Algorithm for Deadlock Immunity, Horatiu Jula and George Candea, appears in
Proc. 8th Workshop on Runtime Verification (RV), Budapest, Hungary
(March 2008).
An extended version appeared as EPFL Technical Report DSLAB-2007-002
Downloads
1. Java
We are readying Java-Dimmunix for an open-source release in the coming weeks; if you cannot wait until then, we will be happy to provide you with the June-2008 release of Dimmunix for Java under the GNU Public License. Please contact one of the authors above.
You must have AspectJ installed (e.g., in directory $ASPECTJ_HOME).
Unpack Dimmunix (e.g., in directory $DIMMUNIX_HOME).
To apply Dimmunix to existing applications, do:
$ASPECTJ_HOME/bin/ajc -Xjoinpoints:synchronization -aspectpath $DIMMUNIX_HOME -cp $ASPECTJ_HOME/lib/aspectjrt.jar -source 1.5 *.java
When running the instrumented application, make sure you have in the
CLASSPATH the following two paths:
$ASPECTJ_HOME/lib/aspectjrt.jar:$DIMMUNIX_HOME.
Test Code
- Microbenchmark
- The following tests reproduce deadlock bugs in MySQL JDBC:
- The following tests reproduce deadlock bugs in the Java JDK. Note that AspectJ prohibits weaving JDK classes. Normally, one would apply load time weaving, but the option -Xjoinpoints:synchronization (essential for Dimmunix) is not yet supported by AspectJ's load-time weaver. Thus, instead we provide a simple wrapper class (e.g., MyHashTable.java).
2. Linux NPTL (POSIX Threads)
We are readying NPTL-Dimmunix for an open-source release in the coming weeks; if you cannot wait until then, we will be happy to provide you with the June-2008 release of NPTL-Dimmunix (glibc 2.7) under the GNU Public License. Please contact one of the authors above.
- Unzip inside glibc/ntpl source folder
- Type make under your glibc build folder
3. FreeBSD libthr (POSIX Threads)
We are readying libthr-Dimmunix for an open-source release in the coming weeks; if you cannot wait until then, we will be happy to provide you with the June-2008 release of libthr-Dimmunix (FreeBSD 7.x) under the GNU Public License. Please contact one of the authors above.
- Unzip inside libthr source folder (you can copy the entire libthr to another folder)
- Type make under libthr build folder
- Set LIBRARY_PATH to your new libthr.so, e.g. "setenv LD_LIBRARY_PATH .."
- Don't forget to check the test/README :-) [readme]
Testing
- Inside folder test, type make to build our microbenchmark application test_perf
- You can execute any benchmark script inside this folder, it will automatically set the proper environment variables
- Below a list of some of our benchmarks:
- Dimmunix overhead breakdown [script]
[gnuplot]
- Stack depth throughput impact [script]
[gnuplot]
- Delay inside lock/unlock vs delay between lock operations [script]
[gnuplot]
For more details, see the DSLab web page.