Dynamic analysis tool from Coverity looks at concurrency defects

Concurrent programs loom as a major developer and tester challenge as multicore processors grow in use. A dynamic analysis tool for Java from Coverity may automatically detect multithreading deadlocks and race conditions, while incurring low overhead.

By many accounts, multithreaded concurrent applications are looming as a programming and testing nightmare. That is because new generations of multi-core processor chips -- which gain performance advantages by adding processors rather than by increasing clock rate -- are coming to market in greater numbers and they require a new view on development.

The multi-core chips can cause existing performance tuning techniques to fail. In some cases, programs may run and then fail unexpectedly when race conditions are set off by sleeping concurrency defects.

To help deal with such issues, software quality tool maker Coverity, Inc. has released Coverity Thread Analyzer for Java. The software is a dynamic analysis tool for multithreaded applications. It is said to automatically detect concurrency defects that can cause data corruption and application failures. The tool was announced this week at the JavaOne conference in San Francisco.

"With multi-core, if you only write serial programs, CPUs sit idle," said Andy Chou, chief scientist and co-founder of Coverity. "Software developers are not well trained in this area. But developers are being asked to write [multithreaded programs]."

Concurrent apps seem like a potential hotbed of the worst kind of error -- the irreproducible error.

With multithreaded programs, there are many possible execution paths, said Chou. You may get the same results in different ways each time the program runs. That makes it especially hard to test. "The Thread Analyzer for Java makes race condition detection reproducible and predictable," said Chou.

Code analysis news and tips
Eight reasons to do source code analysis on your Web application 

BMC uses source code analysis to improve software line 

Klocwork enhances static code analysis suite

With race conditions, multiple threads attempt to access the same shared data without appropriate locks in place. The Coverity analyzer automatically instruments bytecode, without changing source code, to detect such bugs. The tool also uncovers code deadlocks that are not immediately apparent in debugging.

By Coverity's estimates, the analyzer has a low two times overhead for most programs, enabling the tool to be used in select production environments. The tool combines with Coverity Prevent static analysis tools for Java, and it integrates with the Eclipse IDE.

Dig Deeper on Topics Archive