Skip to main content

Using Block-Local Atomicity to Detect Stale-Value Concurrency Errors

  • Conference paper
Automated Technology for Verification and Analysis (ATVA 2004)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3299))

Abstract

Data races do not cover all kinds of concurrency errors. This paper presents a data-flow-based technique to find stale-value errors, which are not found by low-level and high-level data race algorithms. Stale values denote copies of shared data where the copy is no longer synchronized. The algorithm to detect such values works as a consistency check that does not require any assumptions or annotations of the program. It has been implemented as a static analysis in JNuke. The analysis is sound and requires only a single execution trace if implemented as a run-time checking algorithm. Being based on an analysis of Java bytecode, it encompasses the full program semantics, including arbitrarily complex expressions. Related techniques are more complex and more prone to over-reporting.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Arnold, K., Gosling, J.: The Java Programming Language. Addison-Wesley, Reading (1996)

    MATH  Google Scholar 

  2. Artho, C., Biere, A.: Applying static analysis to large-scale, multithreaded Java programs. In: Grant, D. (ed.) Proc. 13th ASWEC, Canberra, Australia, IEEE Computer Society, Los Alamitos (2001)

    Google Scholar 

  3. Artho, C., Havelund, K., Biere, A.: High-level data races. Journal on Software Testing. Verification & Reliability (STVR) 13(4) (2003)

    Google Scholar 

  4. Artho, C., Schuppan, V., Biere, A., Eugster, P., Baur, M., Zweimüller, B.: JNuke: efficient dynamic analysis for Java. In: Alur, R., Peled, D.A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 462–465. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  5. Blanchet, B.: Escape analysis for object-oriented languages: application to Java. In: Proc. OOPSLA 1999, Denver, USA, pp. 20–34. ACM Press, New York (1999)

    Chapter  Google Scholar 

  6. Blanchet, B.: Escape analysis for java, theory and practice. ACM Transactions on Programming Languages and Systems 25(6), 713–775 (2003)

    Article  MathSciNet  Google Scholar 

  7. Bogda, J., Hölzle, U.: Removing unnecessary synchronization in Java. In: Proc. OOPSLA 1999, Denver, USA, pp. 35–46. ACM Press, New York (1999)

    Chapter  Google Scholar 

  8. Burrows, M., Leino, R.: Finding stale-value errors in concurrent programs. Technical Report SRC-TN-2002-004, Compaq SRC, Palo Alto, USA (2002)

    Google Scholar 

  9. Choi, J., Gupta, M., Serrano, M., Sreedhar, V., Midkiff, S.: Escape analysis for Java. In: Proc. OOPSLA 1999, Denver, USA, pp. 1–19. ACM Press, New York (1999)

    Chapter  Google Scholar 

  10. Flanagan, C.: Verifying commit-atomicity using model-checking. In: Graf, S., Mounier, L. (eds.) SPIN 2004. LNCS, vol. 2989, pp. 252–266. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  11. Flanagan, C., Freund, S.: Atomizer: a dynamic atomicity checker for multithreaded programs. SIGPLAN Not 39(1), 256–267 (2004)

    Article  Google Scholar 

  12. Flanagan, C., Leino, R., Lillibridge, M., Nelson, G., Saxe, J., Stata, R.: Extended static checking for Java. In: Proc. PLDI 2002, Berlin, Germany, pp. 234–245. ACM Press, New York (2002)

    Google Scholar 

  13. Flanagan, C., Qadeer, S.: Types for atomicity. In: Proc. Workshop on Types in Language Design and Implementation (TLDI 2003), New Orleans, USA, ACM Press, New York (2003)

    Google Scholar 

  14. Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Virtual Machine Specification, 2nd edn. Addison-Wesley, Reading (2000)

    Google Scholar 

  15. Harrow, J.: Runtime checking of multithreaded applications with Visual Threads. In: Havelund, K., Penix, J., Visser, W. (eds.) SPIN 2000. LNCS, vol. 1885, Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  16. Lea, D.: Concurrent Programming in Java, Second Edition, 2nd edn. Addison-Wesley, Reading (1999)

    Google Scholar 

  17. Lipton, R.J.: Reduction: a method of proving properties of parallel programs. Commun. ACM 18(12), 717–721 (1975)

    Article  MATH  MathSciNet  Google Scholar 

  18. Praun, C.v., Gross, T.: Static detection of atomicity violations in object-oriented programs. In: Proc. Formal Techniques for Java-like Programs, vol. 408 of Technical Reports from ETH Zürich. ETH Zürich (2003)

    Google Scholar 

  19. Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: a dynamic data race detector for multithreaded programs. ACM Trans. on Computer Systems 15(4) (1997)

    Google Scholar 

  20. Visser, W., Havelund, K., Brat, G., Park, S., Lerda, F.: Model checking programs. Automated Software Engineering Journal 10(2) ( April 2003)

    Google Scholar 

  21. von Praun, C., Gross, T.: Object-race detection. In: OOPSLA 2001, Tampa Bay, USA, ACM Press, New York (2001)

    Google Scholar 

  22. Wang, L., Stoller, S.: Run-time analysis for atomicity. In: Proc. Run-Time Verification Workshop (RV 2003), Boulder, USA. ENTCS, vol. 89(2), Elsevier, Amsterdam (2003)

    Google Scholar 

  23. Whaley, J., Rinard, M.: Compositional pointer and escape analysis for Java programs. In: Proc. OOPSLA 1999, Denver, USA, pp. 187–206. ACM Press, New York (1999)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Artho, C., Havelund, K., Biere, A. (2004). Using Block-Local Atomicity to Detect Stale-Value Concurrency Errors. In: Wang, F. (eds) Automated Technology for Verification and Analysis. ATVA 2004. Lecture Notes in Computer Science, vol 3299. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30476-0_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30476-0_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-23610-8

  • Online ISBN: 978-3-540-30476-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics