FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Development Tools
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
December 11, 2007
Coverity Takes on Concurrency

Controllingthe complexity of multi-threaded applications by automatically identifying crash-causing concurrency defects

Coverity has announced availability of new concurrency defect detection capabilities in Coverity Prevent static code analysis tool for C/C++ and Java. This new technology introduces what the company claims is the first static defect detection of race conditions, one of the most difficult to find concurrency errors that occurs in multi-threaded applications.

Race condition defects have been responsible for some of the most notorious failures in software. For example, race conditions in the software of the Therac-25 radiation therapy machine were cited as contributing to the death of five patients. Race conditions were also a contributing factor in the North American Blackout of August 2003, during which 50 million people lost power.

The advent of multi-core hardware, whether computers from vendors such as AMD or Intel, or consumer goods such as the Sony PlayStation 3, are driving the emergence of multi-threaded software applications that are susceptible to race condition defects. To take advantage of multi-core hardware requires new, multi-threaded applications that can simultaneously execute multiple, interacting computational tasks.

Designing multi-threaded applications is highly complex, and introduces a new class of potential application failures when the intricacies of concurrently running threads are not handled properly. To date, testing for concurrency defects such as race conditions has been extremely difficult due to the complexity in run-time environments where multiple threads execute simultaneously while accessing shared memory.

According to the company, Coverity Prevent helps control the complexity of multi-threaded applications by automatically identifying these hard-to-find, often crash-causing concurrency defects such as:

  • Race Condition. Multiple threads access the same shared data without the appropriate locks to protect access points. When this defect occurs, one thread may inadvertently overwrite data used by another thread, leading to both loss of information and data corruption.
  • Deadlock. Two or more threads wait for a lock in a circular chain such that the locks can never be acquired. When this defect occurs, the entire software system may halt, as none of the threads can either proceed along their current execution paths or exit.
  • Thread Block. A thread calls a long-running operation while holding a lock thereby preventing the progress of other threads. When this defect occurs, application performance can drop dramatically due to a single bottleneck for all threads.

"Race conditions are particularly difficult for developers because they are hard to test for, nearly impossible to replicate, and the consequence of a race condition in the field can be disastrous," says Coverity CTO Ben Chelf. "Coverity's new technology overcomes all of these challenges and helps developers eliminate this painful defect type."

TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK