Discussions about Software at UMCP

July 19, 2004

Dave Hovemeyer, Finding Concurrency Bugs in Java

Because threads are a core feature of the Java language, the widespread adoption of Java has exposed a much wider audience to concurrency than previous languages have. Concurrent programs are notoriously difficult to write correctly, and many subtle bugs can result from incorrect use of threads and synchronization. Therefore, finding techniques to find concurrency bugs is an important problem.

Through development and use of an automatic static analysis tool, we have found a significant number of concurrency bugs in widely used Java applications and libraries. Interestingly, we have found that race conditions abound in concurrent Java programs; underuse of synchronization is the rule rather than the exception. We have also found many examples of other kinds of concurrency errors, suggesting that many Java programmers have fundamental misconceptions about how to write correct multithreaded programs.

This paper makes two main contributions. First, it describes simple analysis techniques that are effective at finding concurrency errors in real programs. Second, it provides evidence that threads and concurrency are widely misused in Java, even in programs written by experienced programmers.

James Rose, Dynamic Inference of Polymorphic Lock Types

I will present an approach for automatically proving the absence of race conditions in multi-threaded Java programs, using a combination of dynamic and static analysis. The program in question is instrumented so that when executed it will gather information about locking relationships. This information is then fed to our tool, which generates annotations needed to type check the program using the Race-Free Java type system. I will describe the design and implementation of our approach, and our experience applying the tool to a variety of Java programs. We have found the approach works well, but has trouble scaling to large programs, which require extensive testing for full coverage.

Web Accessibility