Distributed Computing Laboratory

Emory University


Sept 3, 2007
Version 3.1 released. Now includes versions for Java 6.0
Nov 11, 2006
Version 3.0 released. Now includes versions for Java 1.2, 1.3, 1.4, and 5.0 (sic!)
Jun 4, 2006
Version 2.2 released.


The backport has been around since December 2004. It has been downloaded tens of thousands of times. It has been successfully used in many open-source and commercial projects. Arguably, it has become a de-facto standard concurrency library for Java 1.4, and by now, it is very well tested by its users.

Moreover, the backport is based on a very stable and robust code base of JSR 166 and dl.util.concurrent. This partially explains why so few bugs have been reported against it. Once again, I would like to express gratitude to the JSR 166 expert group for doing such a great job, and for their commitment to open source.

Unit tests

Version 3.1 of the library passes all the relevant 1859 unit tests from TCK test package designed for java.util.concurrent (the tests of unsupported functionality were skipped).

The following unit tests have been completed (listed in the alphabetical order): AbstractExecutorServiceTest, AbstractQueueTest, ArrayBlockingQueueTest, ArrayDequeTest, AtomicBooleanTest, AtomicIntegerArrayTest, AtomicIntegerTest, AtomicLongArrayTest, AtomicLongTest, AtomicMarkableReferenceTest, AtomicReferenceArrayTest, AtomicReferenceTest, AtomicStampedReferenceTest, ConcurrentHashMapTest, ConcurrentLinkedQueueTest, ConcurrentSkipListMapTest, ConcurrentSkipListSubMapTest, ConcurrentSkipListSetTest, ConcurrentSkipListSubSetTest, CopyOnWriteArrayListTest, CopyOnWriteArraySetTest, CountDownLatchTest, CyclicBarrierTest, DelayQueueTest, EntryTest, ExchangerTest, ExecutorsTest, ExecutorCompletionServiceTest, FutureTaskTest, LinkedBlockingDequeTest, LinkedBlockingQueueTest, LinkedListTest, PriorityBlockingQueueTest, PriorityQueueTest, ReentrantLockTest, ReentrantReadWriteLockTest, ScheduledExecutorTest, ScheduledExecutorSubclassTest, SemaphoreTest, SynchronousQueueTest, SystemTest (testing Utils.nanoTime()), ThreadLocalTest, ThreadPoolExecutorTest, ThreadPoolExecutorSubclassTest, TimeUnitTest, TreeMapTest, TreeSubMapTest, TreeSetTest, TreeSubSetTest.

Stress tests

The backport is being stress-tested using the "loops" tests from JSR 166 (courtesy of Doug Lea and the JSR 166 Expert Group). The tests, included in the development source bundle, thoroughly evaluate behavior and performance of various types of locks, queues, maps, futures, and other API classes, under various conditions (contention etc.) and circumstances, including cancellation.

Despite exhaustive testing, as any software, this library may still contain bugs. If you find one, please report it, or better yet, contribute a fix.

Known problems

Note: A bug has been reported against Sun 1.4.2_04 JVMs, and fixed in 1.4.2_06 (see ID 4917709) that makes those JVMs to occassionally crash with SIGSEGV during backport stress tests, particularly MapLoops and MapChecks. It is therefore recommended to use JVM versions 1.4.2_06 or newer when using the backport (although the crashes seem to not happen also on 1.4.2_03, and perhaps on earlier JVMs). Detected in version: 2.0.

Note: due to what is apparently a bug in SUN JVM implementations for Solaris, observed on 1.4.2_03 and 1.4.2_06, the 'ExecutorsTest.testPrivilegedThreadFactory()' unit test fails with ClassNotFoundException when launched from a class path that has backport classes stored as individual files in the "classes" directory. The problem disappears when the classes are put in a JAR file. The bug is most likely related to handling context class loaders. It is therefore advised to use JAR files instead of class files when running code that explicitly or implicitly modifies context class loaders, as does privileged thread factory. Detected in version: 2.0.

Note: missed signals have been observed on Linux 2.6.3-7 kernel for SMP w/64GB support under contention and in the presence of frequent timeouts. (The bug was captured during TimeoutProducerConsumerLoops on SynchronousQueue). Apparently, this is caused by a kernel bug. The problem have been observed on several different JVMs. It does not occur on newer kernels. Detected in version: 2.0.

As evident from the above, IT IS CRUCIAL THAT YOU RUN THE STRESS TESTS on the target configuration before using the backport in a production environment. Concurrency issues are tricky, and possible bugs in JVMs, operating systems, and this software, usually won't show up until under heavy loads. Stress tests included with this distribution test this software under extreme conditions, so if they are consistently passing, there's a very good chance that everything works fine.