Nothing Special   »   [go: up one dir, main page]

skip to main content
article

Associating synchronization constraints with data in an object-oriented language

Published: 11 January 2006 Publication History

Abstract

Concurrency-related bugs may happen when multiple threads access shared data and interleave in ways that do not correspond to any sequential execution. Their absence is not guaranteed by the traditional notion of "data race" freedom. We present a new definition of data races in terms of 11 problematic interleaving scenarios, and prove that it is complete by showing that any execution not exhibiting these scenarios is serializable for a chosen set of locations. Our definition subsumes the traditional definition of a data race as well as high-level data races such as stale-value errors and inconsistent views. We also propose a language feature called atomic sets of locations, which lets programmers specify the existence of consistency properties between fields in objects, without specifying the properties themselves. We use static analysis to automatically infer those points in the code where synchronization is needed to avoid data races under our new definition. An important benefit of this approach is that, in general, far fewer annotations are required than is the case with existing approaches such as synchronized blocks or atomic sections. Our implementation successfully inferred the appropriate synchronization for a significant subset of Java's Standard Collections framework.

References

[1]
Gul Agha. An overview of actor languages. In Proceedings of the 1986 SIGPLAN workshop on Object-oriented programming, pages 58--67, New York, NY, USA, 1986.
[2]
C. S. Ananian and M. Rinard. Language-level transactions. In High-Performance Embedded Computing (HPEC), 2004.
[3]
C. Artho, K. Havelund, and A. Biere. High-level data races. In Proc. NDDL/VVEIS'03, pages 82--93, 2003.
[4]
C. Artho, K. Havelund, and A. Biere. Using block-local atomicity to detect stale-value concurrency errors. In ATVA'04, pages 150--164, 2004.
[5]
D. F. Bacon, R. E. Strom, and A. Tarafdar. Guava: A dialect of Java without data races. In Proc. OOPSLA'00, pages 382--400, 2000.
[6]
D. Bäumer, E. Gamma, and Adam Kieÿ zun. Integrating refactoring support into a Java development tool. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) Companion, October 2001.
[7]
H. Berenson, P. Bernstein, J. Gray, J. Melton, E. O'Neil, and P. O'Neil. A critique of ANSI SQL isolation levels. In Proc. ACM SIGMOD Conf., pages 1--10, 1995.
[8]
P. Bernstein, V. Hadzilacos, and N. Goodman. Concurrency Control and Recovery in Database Systems. Addison-Wesley, 1987.
[9]
C. Boyapati and M. Rinard. A parameterized type system for race-free Java programs. In Proc. OOPSLA'01, October 2001.
[10]
M. Burrows and K. R. M. Leino. Finding stale-value errors in concurrent programs. Technical Report 2002-004, SRC, May 2002.
[11]
Philippe Charles, Christopher Donawa, Kemal Ebcioglu, Christian Grothoff, Allan Kielstra, Vijay Saraswat, Vivek Sarkar, and Christoph von Praun. X10: An object-oriented approach to non-uniform cluster computing. In Proc. OOPSLA'05, San Diego, CA, 2005. To appear.
[12]
A. Chien, U. Reddy, J. Plevyak, and J. Dolby. ICC++ - A C++ dialect for high performance parallel computing. Lecture Notes in Computer Science, 1049:76--95, 1996.
[13]
Andrew A. Chien and William J. Dally. Concurrent aggregates (ca). In Proc. PPoPP '90, pages 187--196, 1990.
[14]
X. Deng, M. Dwyer, J. Hatcliff, and M. Mizuno. Invariant-based specification, synthesis, and verification of synchronization in concurrent programs. In Proc. ICSE'02, May 2002.
[15]
D. Engler and K. Ashcraft. Racerx: Effective, static detection of race conditions and deadlocks. In Proc. SOSP'03, pages 237--252, October 2003.
[16]
S. Fink, J. Dolby, and L. Colby. Semi-automatic J2EE transaction configuration. Technical Report RC23326, IBM T.J. Watson Research Center, March 2004.
[17]
C. Flanagan. Verifying commit-atomicity using model checking. In Proc. SPIN'04, pages 252--266, 2004.
[18]
C. Flanagan, S. Freund, and M. Lifshin. Type inference for atomicity. In Proc. TLDI'05, pages 47--58, 2005.
[19]
C. Flanagan and S. N. Freund. Type-based race detection for Java. In Proc. PLDI'00, pages 219--232, 2000.
[20]
C. Flanagan and S. N. Freund. Atomizer: A dynamic atomicity checker for multithreaded programs. In Proc. POPL'04, pages 256--267, 2004.
[21]
C. Flanagan and S. Qadeer. A type and effect system for atomicity. In Proc. PLDI'03, pages 338--349, 2003.
[22]
C. Flanagan and S. Qadeer. Types for atomicity. In Proc. TLDI'03, pages 1--12, 2003.
[23]
T. Harris and K. Fraser. Language support for lightweight transactions. In Proc. OOPSLA'03, pages 388--402, 2003.
[24]
T. Harris, S. Marlow, S. Peyton-Jones, and M. Herlihy. Composable memory transactions. In Proc. PPoPP'05, 2005.
[25]
J. Hatcliff, Robby, and M. B. Dwyer. Verifying atomicity specifications for concurrent object-oriented software using model checking. In Proc. VMCAI'04, pages 175--190, 2004.
[26]
Gary A. Kildall. A unified approach to global program optimization. In Proc. POPL'73, pages 194--206, 1973.
[27]
K. R. M. Leino. Data groups: Specifying the modification of extended state. In Proc. OOPSLA'98, pages 144--153, 1998.
[28]
K. R. M. Leino, J. B. Saxe, and R. Stata. Checking Java programs via guarded commands. Technical Report 002, Compaq SRC, 1999.
[29]
R. J. Lipton. Reduction: A method of proving properties of parallel programs. CACM, 18(12), 1975.
[30]
R. O'Callahan and J.-D. Choi. Hybrid dynamic data race detection. In Proc. PPoPP'03, pages 167--178, 2003.
[31]
Java Community Process. JSR 166: Concurrency utilities. See http://gee.cs.oswego.edu/dl/concurrency-interest/index.html., September 2004.
[32]
A. Sasturkar, R. Agarwal, L. Wang, and S. Stoller. Automated type-based analysis of data races and atomicity. In Proc. PPoPP'05, 2005.
[33]
S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: a dynamic data race detector for multi-threaded programs. In Proc. SOSP'97, pages 27--37, October 1997.
[34]
C. von Praun and T. Gross. Static detection of atomicity violations in object-oriented programs. Journal of Object Technology, 3(2), 2004.
[35]
Liqiang Wang and Scott D. Stoller. Runtime analysis for atomicity for multi-threaded programs. Technical Report DAR-04-14, State University of New York At Stony Brook, May 2005.
[36]
A. Welc, S. Jagannathan, and A. Hosking. Transactional monitors for concurrent objects. In Proc. ECOOP'04, pages 519--542, 2004.
[37]
ANSI X3.135-1992. In American National Standard for Information Systems -- Database Language -- SQL, November 1992.
[38]
M. Xu, R. Bodik, and M. Hill. A serializability violation detector for shared-memory server programs. In Proc. PLDI'05, pages 1--14, 2005.

Cited By

View all
  • (2023)Detecting Atomicity Violations in Interrupt-Driven Programs via Interruption Points Selecting and Delayed ISR-TriggeringProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3616276(1153-1164)Online publication date: 30-Nov-2023
  • (2023)intCV: Automatically Inferring Correlated Variables in Interrrupt-Driven Program2023 IEEE 23rd International Conference on Software Quality, Reliability, and Security (QRS)10.1109/QRS60937.2023.00061(562-568)Online publication date: 22-Oct-2023
  • (2022)Precise and efficient atomicity violation detection for interrupt-driven programs via staged path pruningProceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3533767.3534412(506-518)Online publication date: 18-Jul-2022
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 41, Issue 1
Proceedings of the 2006 POPL Conference
January 2006
421 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/1111320
Issue’s Table of Contents
  • cover image ACM Conferences
    POPL '06: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
    January 2006
    432 pages
    ISBN:1595930272
    DOI:10.1145/1111037
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 January 2006
Published in SIGPLAN Volume 41, Issue 1

Check for updates

Author Tags

  1. concurrent object-oriented programming
  2. data races
  3. programming model
  4. serializability

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)18
  • Downloads (Last 6 weeks)2
Reflects downloads up to 12 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Detecting Atomicity Violations in Interrupt-Driven Programs via Interruption Points Selecting and Delayed ISR-TriggeringProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3616276(1153-1164)Online publication date: 30-Nov-2023
  • (2023)intCV: Automatically Inferring Correlated Variables in Interrrupt-Driven Program2023 IEEE 23rd International Conference on Software Quality, Reliability, and Security (QRS)10.1109/QRS60937.2023.00061(562-568)Online publication date: 22-Oct-2023
  • (2022)Precise and efficient atomicity violation detection for interrupt-driven programs via staged path pruningProceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3533767.3534412(506-518)Online publication date: 18-Jul-2022
  • (2021)Constrained permutation-based test scenario generation from concurrent activity diagramsInnovations in Systems and Software Engineering10.1007/s11334-021-00389-417:4(343-353)Online publication date: 1-Dec-2021
  • (2020)Free the Bugs: Disclosing Blocking Violations in Reactive Programming2020 IEEE 20th International Working Conference on Source Code Analysis and Manipulation (SCAM)10.1109/SCAM51674.2020.00025(177-186)Online publication date: Sep-2020
  • (2018)A systematic survey on automated concurrency bug detection, exposing, avoidance, and fixing techniquesSoftware Quality Journal10.1007/s11219-017-9385-326:3(855-889)Online publication date: 1-Sep-2018
  • (2016)Integrating Asynchronous Task Parallelism and Data-centric AtomicityProceedings of the 13th International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools10.1145/2972206.2972214(1-10)Online publication date: 29-Aug-2016
  • (2016)Conc-iSE: incremental symbolic execution of concurrent softwareProceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering10.1145/2970276.2970332(531-542)Online publication date: 25-Aug-2016
  • (2016)From atomic variables to data-centric concurrency controlProceedings of the 31st Annual ACM Symposium on Applied Computing10.1145/2851613.2851734(1806-1811)Online publication date: 4-Apr-2016
  • (2016)Automatic Generation of Unit Tests for Correlated Variables in Parallel ProgramsInternational Journal of Parallel Programming10.1007/s10766-015-0363-844:3(644-662)Online publication date: 1-Jun-2016
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media