Predicting Atomicity Violations in Concurrent Programs via Planning

نویسندگان

  • Niloofar Razavi
  • Azadeh Farzan
  • Sheila A. McIlraith
چکیده

Testing concurrent programs is more difficult than testing sequential programs due to the interleaving explosion problem: even for a fixed program input, there are numerous different runs that need to be tested to account for scheduler behaviour. Testing all such interleavings is not practical. Consequently, most effective testing algorithms attempt to generate runs that are likely to manifest bugs. Atomicity violating runs have been proposed as good candidates since a large fraction of the existing concurrency bugs result from such violations.In this paper we present a general approach to predicting atomicity violations that is based on techniques from Artificial Intelligence (AI) automated planning. We encode the dynamics of our program abstractly in terms of the properties of observed events from a successful program run. We characterize the generation of a run as a sequential planning problem with the temporally extended goal of achieving a particular pattern of atomicity violation. We have integrated our approach into the PENELOPE concurrency testing tool (Sorrentino, Farzan, & Madhusudan 2010). Initial experiments comparing the run prediction time for an implementation of our approach showed it to be comparable to PENELOPE’s static analysis approach. However, there are indications that the planning approach may scale better on longer runs. Further, unlike PENELOPE’S current approach, runs predicted by our approach all correspond to concrete runs of the system. Finally, our planning-based approach has the merit that it can easily accommodate complex atomicity violation patterns by simply modifying the planning goal. For all these reasons, the planning-based approach presented here appears to be a fruitful area for further investigation.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Meta-analysis of Concurrent Program Runs with Nested Locking for Atomicity Violations

We study the problem of determining, given a run of a concurrent program, whether there is any alternate execution of it that violates atomicity, where atomicity is defined using marked blocks of local runs. We show that if a concurrent program adopts nested locking, the problem of predicting atomicity violations is possible efficiently, without the exploration of all interleavings. In particul...

متن کامل

Meta-analysis for Atomicity Violations under Nested Locking

We study the problem of determining, given a run of a concurrent program, whether there is any alternate execution of it that violates atomicity, where atomicity is defined using marked blocks of local runs. We show that if a concurrent program adopts nested locking, the problem of predicting atomicity violations is efficiently solvable, without exploring all interleavings. In particular, for t...

متن کامل

HAVE: Detecting Atomicity Violations via Integrated Dynamic and Static Analysis

The reality of multi-core hardware has made concurrent programs pervasive. Unfortunately, writing correct concurrent programs is difficult. Atomicity violation, which is caused by concurrent executions unexpectedly violating the atomicity of a certain code region, is one of the most common concurrency errors. However, atomicity violation bugs are hard to find using traditional testing and debug...

متن کامل

The Complexity of Predicting Atomicity Violations

We study the prediction of runs that violate atomicity from a single run, or from a regular or pushdown model of a concurrent program. When prediction ignores all synchronization, we show predicting from a single run or from a regular model is solvable in time O(n + c) where n is the length of the run, k is the number of threads, and c is a constant. This is a significant improvement from the s...

متن کامل

Static Detection of Atomicity Violations in Object-Oriented Programs

Violations of atomicity are possible sources of errors in parallel programs. A violation occurs if the effect of a method execution depends on the execution of concurrent threads that operate on the same or overlapping parts of a shared data structure. All accesses to shared data are assumed to be ordered through synchronization, hence common techniques for data race and deadlock detection are ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011