Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

RegionTrack: A Trace-Based Sound and Complete Checker to Debug Transactional Atomicity Violations and Non-Serializable Traces

Published: 31 December 2020 Publication History

Abstract

Atomicity is a correctness criterion to reason about isolated code regions in a multithreaded program when they are executed concurrently. However, dynamic instances of these code regions, called transactions, may fail to behave atomically, resulting in transactional atomicity violations. Existing dynamic online atomicity checkers incur either false positives or false negatives in detecting transactions experiencing transactional atomicity violations. This article proposes <monospace>RegionTrack</monospace>. <monospace>RegionTrack</monospace> tracks cross-thread dependences at the event, dynamic subregion, and transaction levels. It maintains both dynamic subregions within selected transactions and transactional happens-before relations through its novel timestamp propagation approach. We prove that <monospace>RegionTrack</monospace> is sound and complete in detecting both transactional atomicity violations and non-serializable traces. To the best of our knowledge, it is the first online technique that precisely captures the transitively closed set of happens-before relations over all conflicting events with respect to every running transaction for the above two kinds of issues. We have evaluated <monospace>RegionTrack</monospace> on 19 subjects of the DaCapo and the Java Grande Forum benchmarks. The empirical results confirm that <monospace>RegionTrack</monospace> precisely detected all those transactions which experienced transactional atomicity violations and identified all non-serializable traces. The overall results also show that <monospace>RegionTrack</monospace> incurred 1.10x and 1.08x lower memory and runtime overheads than <monospace>Velodrome</monospace> and 2.10x and 1.21x lower than <monospace>Aerodrome</monospace>, respectively. Moreover, it incurred 2.89x lower memory overhead than <monospace>DoubleChecker</monospace>. On average, <monospace>Velodrome</monospace> detected about 55% fewer violations than <monospace>RegionTrack</monospace>, which in turn reported about 3%–70% fewer violations than <monospace>DoubleChecker</monospace>.

References

[1]
RegionTrack. https://github.com/LittleSnow321/RegionTrack-v.
[2]
B. Alpern, S. Augart, S. M. Blackburn, M. Butrico, A. Cocchi, P. Cheng, J. Dolby, S. Fink, D. Grove, M. Hind, K. S. McKinley, M. Mergen, J. E. B. Moss, T. Ngo, V. Sarkar, and M. Trapp. 2005. The jikes research virtual machine project: Building an open-source research community. IBM Systems Journal 44, 2 (2005), 399--417.
[3]
R. Abreu, P. Zoetweji, R. Golsteijn, and A. J. C. van Gemund. 2009. A practical evaluation of spectrum-based fault localization. Journal of Systems and Software 82, 11 (2009), 1780--1792.
[4]
Jikes RVM 3.1.3. http://www.jikesrvm.org/.
[5]
S. Biswas, J. Huang, A. Sengupta, and M. D. Bond. 2014. Doublechecker: Efficient sound and precise atomicity checking. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'14), 28--39.
[6]
The Implementations of DoubleChecker and Velodrome. http://sourceforge.net/p/jikesrvm/research-archive/45/.
[7]
S. M. Blackburn, R. Garner, C. Hoffmann, A. M. Khang, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. 2006. The dacapo benchmarks: Java benchmarking development and analysis. In Proceedings of the 21st Annual ACM SIGPLAN Conference on Object Oriented Programming Systems Languages 8 Applications (OOPSLA'06) 169--190.
[8]
M. D. Bond, M. Kulkarni, M. Cao, M. Zhang, M. F. Salmi, S. Biswas, A. Sengupta, and J. Huang. 2013. Octet: Capturing and controlling cross-thread dependences efficiently. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages 8 Applications (OOPSLA'13), 693--712.
[9]
F. Chen, T. Florin, and G. Rosu. 2008. JPredictor: A predictive runtime analysis tool for Java. In Proceedings of the 30th International Conference on Software Engineering (ICSE'08) 221--230.
[10]
Q. Chen, L. Wang, Z. Yang, and S. D. Stoller. 2009. HAVE: Detecting atomicity violations via integrated dynamic and static analysis. In Proceedings of the 12th International Conference on Fundamental Approaches to Software Engineering (FASE'09) 425--439.
[11]
M. Eslamimehr and M. Lesani. 2015. Atomchase: Directed search towards atomicity violations. In Proceedings of the 26th International Symposium on Software Reliability Engineering (ISSRE'15), 12--23.
[12]
M. Eslamimehr, M. Lesani, and G. Edwards. 2018. Efficient detection and validation of atomicity violations in concurrent programs. Journal of Systems and Software 137, 3 (2018), 618--635.
[13]
A. Farzan and P. Madhusudan. 2008. Monitoring atomicity in concurrent programs. In Proceedings of the 20th International Conference on Computer Aided Verification (CAV'08), 52--65.
[14]
C. Flanagan and S. N. Freund. 2004. Atomizer: A dynamic atomicity checker for multithreaded programs. In Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'04), 256--267.
[15]
C. Flanagan and S. N. Freund. 2008. Atomizer: A dynamic atomicity checker for multithreaded programs. Science of Computer Programming (SCP), 71, 2 (2008), 89--109.
[16]
C. Flanagan, S. N. Freund, and J. Yi. 2008. Velodrome: A sound and complete dynamic atomicity checker for multithreaded programs. In Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'08), 293--303.
[17]
C. Flanagan and S. N. Freund. 2009. FastTrack: Efficient and precise dynamic race detection. In Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'09), 121--133.
[18]
J. Huang and C. Zhang. 2011. Persuasive prediction of concurrency access anomalies. In Proceedings of the 2011 International Symposium on Software Testing and Analysis (ISSTA'11), 144--154.
[19]
J. Huang, Q. Luo, and G. Rosu. 2015. GPredict: Generic predictive concurrency analysis. In Proceedings of the 37th International Conference on Software Engineering (ICSE'15), 847--857.
[20]
Z. Lai, S. C. Cheung, and W. K. Chan. 2010. Detecting atomic-set serializability violations in multithreaded programs through active randomized testing. In Proceedings of the 2010 International Conference on Software Engineering (ICSE'10), 235--244.
[21]
L. Lamport. 1978. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM (CACM), 21, 7 (1978), 558--565.
[22]
R. J. Lipton. 1975. Reduction: A method of proving properties of parallel programs. Communications of the ACM (CACM), 18, 12 (1975), 717--721.
[23]
S. Lu, S. Park, E. Seo, and Y. Zhou. 2008. Learning from mistakes: A comprehensive study on real world concurrency bug characteristics. In Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS'08), 329--339.
[24]
S. Lu, S. Park, and Y. Zhou. 2012. Finding atomicity-violation bugs through unserializable interleaving testing. IEEE Transactions on Software Engineering (TSE) 38, 4 (2012), 844--860.
[25]
F. Mattern. 1988. Virtual time and global states of distributed systems. In Parallel and Distributed Algorithms, 215--226.
[26]
P. Maiya and A. Kanade. 2017. Efficient computation of happens-before relation for event-driven programs. In Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2017), 102--112.
[27]
C.-S. Park and K. Sen. 2008. Randomized active atomicity violation detection in concurrent programs. In Proceedings of the 16th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE'08), 135--145.
[28]
S. Park, S. Lu, and Y. Zhou. 2009. CTrigger: Exposing atomicity violation bugs from their hiding places. In Proceedings of the 14th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS'09), 25--36.
[29]
M. Samak and M. K. Ramanathan. 2015. Synthesizing tests for detecting atomicity violations. In Proceedings of the 10th Joint Meeting on Foundations of Software Engineering (ESEC/FSE'15), 131--142.
[30]
S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. 1997. Eraser: A dynamic data race detector for multi-threaded programs. In Proceedings of the 16th ACM Symposium on Operating Systems Principles (SOSP'97), 27--37.
[31]
G. Agha and K. Palmskog. 2018. Transforming threads into actors: Learning concurrency structure from execution traces. In Principles of Modeling. Lecture Notes in Computer Science, 10760, 16--37.
[32]
A. Sengupta, S. Biswas, M. Zhang, M. D. Bond, and M. Kulkarni. 2015. Hybrid static-dynamic analysis for statically bounded region serializability. In Proceedings of the 20th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS'15), 561--575.
[33]
S. Zhuo, R. Zeng, and X. He. 2018. A method for predicting two-variable atomicity violations. In Proceedings of the 2018 IEEE International Conference on Software Quality, Reliability and Security (QRS'18), 103--110.
[34]
Q. Shi, J. Huang, Z. Chen, and B. Xu. 2016. Verifying synchronization for atomicity violation fixing. IEEE Transactions on Software Engineering (TSE) 42, 3 (2016), 280--296.
[35]
A. Sinha, S. Malik, C. Wang, and A. Gupta. 2011. Predictive analysis for detecting serializability violations through trace segmentation. In Proceedings of the 9th International Conference on Formal Methods and Models for Codesign (MEMOCODE'11), 99--108.
[36]
F. Sorrentino, A. Farzan, and P. Madhusudan. 2010. PENELOPE: Weaving threads to expose atomicity violations. In Proceedings of the 2010 ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE'10), 37--46.
[37]
C. DeLozier, A. Eizenberg, B. Lucia, and J. Devietti. 2018. SOFRITAS: Serializable ordering-free regions for increasing thread atomicity scalably. In Proceedings of the 23rd International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS'18). 286--300.
[38]
W. N. Sumner, C. Hammer, and J. Dolby. 2012. Marathon: Detecting atomic-set serializability violations with conflict graphs. In Proceedings of the 2nd International Conference on Runtime Verification (RV'11), 161--176.
[39]
E. Pobee and W. K. Chan. 2019. AggrePlay: Efficient record and replay of multi-threaded programs. In Proceedings of the 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2019). ACM, New York, 567--577.
[40]
E. Pobee, X. Mei, and W. K. Chan. 2019. Efficient transaction-based deterministic replay for multi-threaded programs. In Proceedings of 34th IEEE/ACM International Conference on Automated Software Engineering (ASE'19).
[41]
J. Huang, P. Liu, and C. Zhang. 2010. Leap: Lightweight deterministic multiprocessor replay of concurrent java programs. In Proceedings of the 18th ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE’10). ACM, 207--216.
[42]
L. Wang and S. D. Stoller. 2006. Accurate and efficient runtime detection of atomicity errors in concurrent programs. In Proceedings of the 11th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP'06), 137--146.
[43]
L. Wang and S. D. Stoller. 2006. Runtime analysis of atomicity for multi-threaded programs. IEEE Transactions on Software Engineering (TSE) 32, 2 (2006), 93--110.
[44]
J. R. Wilcox, P. Finch, C. Flanagan, and S. N. Freund. 2015. Array shadow state compression for precise dynamic race detection. In Proceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering (ASE'15), 155--165.
[45]
S. Wu, C. Yang, C. Jia, and W. K. Chan. 2016. ASP: Abstraction subspace partitioning for detection of atomicity violations with an empirical study. IEEE Transactions on Parallel and Distributed Systems (TPDS) 27, 3 (2016), 724--734.
[46]
S. Wu, C. Yang, and W. K. Chan. 2015. ASR: Abstraction subspace reduction for exposing atomicity violation bugs in multithreaded programs. In Proceedings of the 2015 IEEE International Conference on Software Quality, Reliability and Security (QRS'15), 272--281.
[47]
X. N. Chang, W. S. Dou, Y. Gao, J. Wang, J. Wei, and T. Huang. 2019. Detecting atomicity violations for event-driven node.js applications. In Proceedings of the 41st International Conference on Software Engineering (ICSE'19). IEEE Press, Piscataway, NJ, 631--642.
[48]
L. A. Smith, J. M. Bull, and J. Obdrizalek. 2001. A parallel java grande benchmark suite. In Proceedings of the 2001 ACM/IEEE Conference on Supercomputing (SC’01) (6--6). IEEE.
[49]
K. Shiv, K. Chow, Y. Wang, and D. Petrochenko. 2009. SPECjvm2008 performance characterization. In SPEC Benchmark Workshop (17--35). Springer, Berlin.
[50]
G. Li, S. Lu, M. Musuvathi, S. Nath, and R. Padhye. 2019. Efficient scalable thread-safety-violation detection: Finding thousands of concurrency bugs during testing. In Proceedings of the 27th ACM Symposium on Operating Systems Principles (SOSP'19). ACM, New York, 162--180.
[51]
C. V. Praun and T. R. Gross. 2003. Static conflict analysis for multi-threaded object-oriented programs. In Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation (PLDI’03). ACM, New York, 115--128.
[52]
U. Mathur and M. Viswanathan. 2020. Atomicity checking in linear time using vector clocks. In Proceedings of the 25th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS’20). ACM, New York, 183--199.
[53]
S. Wu, 2016. Efficient and sound dynamic atomicity violation checking. Ph.D. dissertation, City University of Hong Kong, 2016. [Online]. Available: https://scholars.cityu.edu.hk/en/theses/theses(b64a7371-a086-434c-9ff4-a042a3c8effa).html.
[54]
2019. RAPID. https://github.com/umangm/rapid.
[55]
S. Yoo, M. Harman, and D. Clark. 2013. Fault localization prioritization: comparing information theoretic and coverage based approaches. ACM Transactions on Software Engineering and Methodology. 22, 3 (2013), Article 19, 29.
[56]
Colin J. Fidge. 1988. Timestamps in message-passing systems that preserve the partial ordering. In Proceedings of the 11th Australian Computer Science Conference (ACSC'88). K. Raymond (ed.). 56--66.
[57]
E. Pozniansky and A. Schuster. 2003. Efficient on-the-fly data race detection in multithreaded C++ programs. In Proceedings of the 9th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP’03). ACM, New York, 179--190.
[58]
Q. Zhou, L. Li, L. Wang, J. Xue, and X. Feng. 2018. May-happen-in-parallel analysis with static vector clocks. In Proceedings of the 2018 International Symposium on Code Generation and Optimization (CGO 2018). ACM, New York, 228--240.
[59]
JikesRVM Project Status: https://www.jikesrvm.org/ProjectStatus/.

Cited By

View all
  • (2023)Analysis of Multi-Threading and Cache Memory Latency Masking on Processor Performance Using Thread Synchronization TechniqueBrazilian Journal of Science10.14295/bjs.v3i1.4583:1(159-174)Online publication date: 25-Sep-2023
  • (2023)Davida: A Decentralization Approach to Localizing Transaction Sequences for Debugging Transactional Atomicity ViolationsIEEE Transactions on Reliability10.1109/TR.2022.317668072:2(808-826)Online publication date: Jun-2023
  • (2023)Evaluating the Impact of Experimental Assumptions in Automated Fault Localization2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)10.1109/ICSE48619.2023.00025(159-171)Online publication date: May-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Software Engineering and Methodology
ACM Transactions on Software Engineering and Methodology  Volume 30, Issue 1
Continuous Special Section: AI and SE
January 2021
444 pages
ISSN:1049-331X
EISSN:1557-7392
DOI:10.1145/3446626
  • Editor:
  • Mauro Pezzè
Issue’s Table of Contents
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 the author(s) 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: 31 December 2020
Accepted: 01 July 2020
Revised: 01 May 2020
Received: 01 December 2019
Published in TOSEM Volume 30, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Transactional atomicity violation
  2. conflict serializability
  3. debugging
  4. dynamic analysis
  5. linearizability
  6. non-serializable traces

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

  • the CityU MF_EXT
  • NSFC of China
  • the GRF of HKSAR Research Grants Council
  • the HKSAR ITF
  • the CityU SRG

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)66
  • Downloads (Last 6 weeks)10
Reflects downloads up to 04 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Analysis of Multi-Threading and Cache Memory Latency Masking on Processor Performance Using Thread Synchronization TechniqueBrazilian Journal of Science10.14295/bjs.v3i1.4583:1(159-174)Online publication date: 25-Sep-2023
  • (2023)Davida: A Decentralization Approach to Localizing Transaction Sequences for Debugging Transactional Atomicity ViolationsIEEE Transactions on Reliability10.1109/TR.2022.317668072:2(808-826)Online publication date: Jun-2023
  • (2023)Evaluating the Impact of Experimental Assumptions in Automated Fault Localization2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)10.1109/ICSE48619.2023.00025(159-171)Online publication date: May-2023
  • (2022)On-the-Fly Repairing of Atomicity Violations in ARINC 653 SoftwareApplied Sciences10.3390/app1204201412:4(2014)Online publication date: 15-Feb-2022
  • (2021)OPE: Transforming Programs with Clean and Precise Separation of Tested Intraprocedural Program Paths with Path Profiling2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS)10.1109/QRS54544.2021.00039(279-290)Online publication date: Dec-2021
  • (2021)Sound Predictive Atomicity Violation Detection§2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS)10.1109/QRS54544.2021.00022(114-125)Online publication date: Dec-2021
  • (2021)Program Verification Enhanced Precise Analysis of Interrupt-Driven Program Vulnerabilities2021 28th Asia-Pacific Software Engineering Conference (APSEC)10.1109/APSEC53868.2021.00033(253-263)Online publication date: Dec-2021

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media