Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2786805.2786815acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article
Open access

What change history tells us about thread synchronization

Published: 30 August 2015 Publication History

Abstract

Multi-threaded programs are pervasive, yet difficult to write. Missing proper synchronization leads to correctness bugs and over synchronization leads to performance problems. To improve the correctness and efficiency of multi-threaded software, we need a better understanding of synchronization challenges faced by real-world developers. This paper studies the code repositories of open-source multi-threaded software projects to obtain a broad and in- depth view of how developers handle synchronizations. We first examine how critical sections are changed when software evolves by checking over 250,000 revisions of four representative open-source software projects. The findings help us answer questions like how often synchronization is an afterthought for developers; whether it is difficult for devel- opers to decide critical section boundaries and lock variables; and what are real-world over-synchronization problems. We then conduct case studies to better understand (1) how critical sections are changed to solve performance prob- lems (i.e. over-synchronization issues) and (2) how soft- ware changes lead to synchronization-related correctness problems (i.e. concurrency bugs). This in-depth study shows that tool support is needed to help developers tackle over-synchronization problems; it also shows that concur- rency bug avoidance, detection, and testing can be improved through better awareness of code revision history.

References

[1]
Zachary Anderson, David Gay, Rob Ennals, and Eric Brewer. Sharc: Checking data sharing strategies for multithreaded c. In PLDI, 2008.
[2]
Sebastian Burckhardt, Pravesh Kothari, Madanlal Musuvathi, and Santosh Nagarakatte. A randomized scheduler with probabilistic guarantees of finding bugs. In ASPLOS, 2010.
[3]
Philippe Charles, Christian Grothoff, Vijay Saraswat, Christopher Donawa, Allan Kielstra, Kemal Ebcioglu, Christoph von Praun, and Vivek Sarkar. X10: An object-oriented approach to non-uniform cluster computing. In OOPSLA, 2005.
[4]
Sigmund Cherem, Trishul M. Chilimbi, and Sumit Gulwani. Inferring locks for atomic sections. In PLDI, 2008.
[5]
Ophelia C. Chesley, Xiaoxia Ren, Barbara G. Ryder, and Frank Tip. Crisp–a fault localization tool for java programs. In ICSE, 2007.
[6]
Andy Chou, Junfeng Yang, Benjamin Chelf, Seth Hallem, and Dawson R. Engler. An empirical study of operating system errors. In SOSP, pages 73–88, 2001.
[7]
Austin T. Clements, M. Frans Kaashoek, Nickolai Zeldovich, Robert Tappan Morris, and Eddie Kohler. The scalable commutativity rule: designing scalable software for multicore processors. In SOSP, 2013.
[8]
Florian David, Gael Thomas, Julia Lawall, and Gilles Muller. Continuously measuring critical section pressure with the free-lunch profiler. In OOPSLA, 2014.
[9]
Eitan Farchi, Yarden Nir, and Shmuel Ur. Concurrent bug patterns and how to test them. In IPDPS, 2003.
[10]
Daniel Fischer. Getting started with bazaar for mysql code. http://dev.mysql.com/tech-resources/ articles/getting-started-with-bazaar-for-mysql.html.
[11]
Cormac Flanagan and Stephen N. Freund. Fasttrack: efficient and precise dynamic race detection. In PLDI, 2009.
[12]
Cormac Flanagan, Stephen N. Freund, and Jaeheon Yi. Velodrome: A sound and complete dynamic atomicity checker for multithreaded programs. In PLDI, 2008.
[13]
Cormac Flanagan and Shaz Qadeer. A type and effect system for atomicity. In PLDI, 2003.
[14]
Pedro Fonseca, Cheng Li, Vishal Singhal, and Rodrigo Rodrigues. A study of the internal and external effects of concurrency bugs. In DSN, 2010.
[15]
Qi Gao, Wenbin Zhang, Zhezhe Chen, Mai Zheng, and Feng Qin. 2ndstrike: Toward manifesting hidden concurrency typestate bugs. In ASPLOS, 2011.
[16]
Kirk Glerum, Kinshuman Kinshumann, Steve Greenberg, Gabriel Aul, Vince Orgovan, Greg Nichols, David Grant, Gretchen Loihle, and Galen C. Hunt. Debugging in the (very) large: ten years of implementation and experience. In SOSP, 2009.
[17]
Shi Han, Yingnong Dang, Song Ge, Dongmei Zhang, and Tao Xie. Performance debugging in the large via mining millions of stack traces. In ICSE, 2012.
[18]
Vilas Jagannath, Qingzhou Luo, and Darko Marinov. Change-aware preemption prioritization. In ISSTA, 2011.
[19]
Guoliang Jin, Linhai Song, Xiaoming Shi, Joel Scherpelz, and Shan Lu. Understanding and detecting realworld performance bugs. In PLDI, 2012.
[20]
Horatiu Jula, Daniel Tralamazza, Cristian Zamfir, and George Candea. Deadlock immunity: Enabling systems to defend against deadlocks. In OSDI, 2008.
[21]
Baris Kasikci, Cristian Zamfir, and George Candea. Data races vs. data race bugs: telling the difference with portend. In ASPLOS, 2012.
[22]
Charles Killian, Karthik Nagaraj, Salman Pervez, Ryan Braud, James W. Anderson, and Ranjit Jhala. Finding latent performance bugs in systems implementations. In FSE, 2010.
[23]
Miryung Kim, Thomas Zimmermann, and Nachiappan Nagappan. A field study of refactoring challenges and benefits. In FSE, 2012.
[24]
James R. Larus and Ravi Rajwar. Transactional Memory. Morgan & Claypool, 2006.
[25]
Paul Luo Li, Ryan Kivett, Zhiyuan Zhan, Sung-eok Jeon, Nachiappan Nagappan, Brendan Murphy, and Andrew J. Ko. Characterizing the differences between pre- and postrelease versions of software. In ICSE, 2011.
[26]
Zhenmin Li, Lin Tan, Xuanhui Wang, Shan Lu, Yuanyuan Zhou, and Chengxiang Zhai. Have things changed now?: an empirical study of bug characteristics in modern open source software. In ASID, 2006.
[27]
Tongping Liu and Emery D. Berger. Sheriff: precise detection and automatic mitigation of false sharing. In OOPSLA, 2011.
[28]
Lanyue Lu, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dusseau, and Shan Lu. A study of linux file system evolution. In FAST, 2013.
[29]
Shan Lu, Soyeon Park, Eunsoo Seo, and Yuanyuan Zhou. Learning from mistakes – a comprehensive study of real world concurrency bug characteristics. In ASPLOS, 2008.
[30]
Shan Lu, Joseph Tucek, Feng Qin, and Yuanyuan Zhou. AVIO: detecting atomicity violations via access interleaving invariants. In ASPLOS, 2006.
[31]
Yi Lu, Lei Shang, Xinwei Xie, and Jingling Xue. An incremental points-to analysis with cfl-reachability. In CC, 2013.
[32]
Brandon Lucia and Luis Ceze. Finding concurrency bugs with context-aware communication graphs. In MICRO, 2009.
[33]
Cristina Marinescu. An empirical investigation on mpi open source applications. In Proceedings of the 18th International Conference on Evaluation and Assessment in Software Engineering, EASE ’14, pages 20:1–20:4, New York, NY, USA, 2014. ACM.
[34]
Bill McCloskey, Feng Zhou, David Gay, and Eric Brewer. Autolocker: Synchronization inference for atomic sections. In POPL, 2006.
[35]
Mozilla Developer Network. Getting mozilla source code using mercurial. https://developer.mozilla.org/ en-US/docs/Mozilla/Developer guide/Source Code/ Mercurial.
[36]
Madanlal Musuvathi, Shaz Qadeer, Thomas Ball, Grard Basler, Piramanayagam A Nainar, and Iulian Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In OSDI, 2008.
[37]
Robert H. B. Netzer and Barton P. Miller. Improving the accuracy of data race detection. In PPoPP, 1991.
[38]
Adrian Nistor, Po-Chun Chang, Cosmin Radoi, and Shan Lu. Caramel: detecting and fixing performance problems that have non-intrusive fixes. In ICSE, 2015.
[39]
Adrian Nistor, Linhai Song, Darko Marinov, and Shan Lu. Toddler: detecting performance problems via similar memory-access patterns. In ICSE, 2013.
[40]
Semih Okur and Danny Dig. How do developers use parallel libraries? In FSE, 2012.
[41]
Nicolas Palix, Ga¨ el Thomas, Suman Saha, Christophe Calvès, Julia L. Lawall, and Gilles Muller. Faults in linux: ten years later. In ASPLOS, 2011.
[42]
Soyeon Park, Shan Lu, and Yuanyuan Zhou. Ctrigger: Exposing atomicity violation bugs from their finding places. In ASPLOS, 2009.
[43]
Aleksey Pesterev, Nickolai Zeldovich, and Robert T. Morris. Locating cache performance bottlenecks using data profiling. In EuroSys, 2010.
[44]
Gustavo Pinto, Weslley Torres, Benito Fernandes, Fernando Castor, and Roberto S.M. Barros. A large-scale study on the usage of java’s concurrent programming constructs. J. Syst. Softw., 106(C):59–81, August 2015.
[45]
Shanxiang Qi, Abdullah Muzahid, Wonsun Ahn, and Josep Torrellas. Dynamically detecting and tolerating if-condition data races. In HPCA, 2014.
[46]
Baishakhi Ray, Daryl Posnett, Vladimir Filkov, and Premkumar T. Devanbu. A large scale study of programming languages and code quality in github. In FSE, 2014.
[47]
Xiaoxia Ren, Fenil Shah, Frank Tip, Barbara G. Ryder, and Ophelia Chesley. Chianti: A tool for change impact analysis of java programs. In OOPSLA, 2004.
[48]
Christopher J. Rossbach, Owen S. Hofmann, and Emmett Witchel. Is transactional programming actually easier? In WDDD, 2009.
[49]
Wenjia Ruan, Trilok Vyas, Yujie Liu, and Michael Spear. Transactionalizing legacy code: An experience report using gcc and memcached. In ASPLOS, 2014.
[50]
Caitlin Sadowski, Jaeheon Yi, and Sunghun Kim. The evolution of data races. In Proceedings of the 9th IEEE Working Conference on Mining Software Repositories (MSR), 2012.
[51]
Diptikalyan Saha and C. R. Ramakrishnan. Incremental and demand-driven points-to analysis using logic programming. In PPDP, 2005.
[52]
Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, and Thomas Anderson. Eraser: A dynamic data race detector for multithreaded programs. ACM TOCS, 1997.
[53]
Yao Shi, Soyeon Park, Zuoning Yin, Shan Lu, Yuanyuan Zhou, Wenguang Chen, and Weimin Zheng. Do i use the wrong definition?: Defuse: Definitionuse invariants for detecting concurrency and sequential bugs. In OOPSLA, 2010.
[54]
Charles Spearman. Spearman’s rank correlation coefficient. http://en.wikipedia.org/wiki/Spearman’s rank correlation coefficient.
[55]
M. Sullivan and R. Chillarege. A comparison of software defects in database management systems and operating systems. In FTCS, 1992.
[56]
Nathan R. Tallent, John M. Mellor-Crummey, and Allan Porterfield. Analyzing lock contention in multithreaded applications. In PPoPP, 2010.
[57]
Valerio Terragni, Shing-Chi Cheung, and Charles Zhang. Recontest: Effective regression testing of concurrent programs. In ICSE, 2015.
[58]
Mandana Vaziri, Frank Tip, and Julian Dolby. Associating synchronization constraints with data in an object-oriented language. In POPL, 2006.
[59]
Frédéric Vivien and Martin Rinard. Incrementalized pointer and escape analysis. In PLDI, 2001.
[60]
Haris Volos, Andres Jaan Tack, Michael M. Swift, and Shan Lu. Applying transactional memory to concurrency bugs. In ASPLOS, 2012.
[61]
Dasarath Weeratunge, Xiangyu Zhang, and Suresh Jagannathan. Accentuating the positive: atomicity inference and enforcement using correct executions. In OOPSLA, 2011.
[62]
Rui Xin, Zhengwei Qi, Shiqiu Huang, Chengcheng Xiang, Yudi Zheng, Yin Wang, and Haibing Guan. An automation-assisted empirical study on lock usage for concurrent programs. In Software Maintenance (ICSM), 2013 29th IEEE International Conference on, pages 100–109, Sept 2013.
[63]
Min Xu, Rastislav Bod´ık, and Mark D. Hill. A serializability violation detector for shared-memory server programs. In PLDI, 2005.
[64]
Dacong Yan, Guoqing (Harry) Xu, and Atanas Rountev. Uncovering performance problems in java applications with reference propagation profiling. In ICSE, 2012.
[65]
Zuoning Yin, Ding Yuan, Yuanyuan Zhou, Shankar Pasupathy, and Lakshmi N. Bairavasundaram. How do fixes become bugs? In FSE, 2011.
[66]
Jie Yu, Satish Narayanasamy, Cristiano Pereira, and Gilles Pokam. Maple: a coverage-driven testing tool for multithreaded programs. In OOPSLA, 2012.
[67]
Tingting Yu, Witawas Srisa-an, and Gregg Rothermel. Simrt: An automated framework to support regression testing for data races. In Proceedings of the 36th International Conference on Software Engineering, ICSE 2014, pages 48–59, New York, NY, USA, 2014. ACM.
[68]
Yuan Yu, Thomas Rodeheffer, and Wei Chen. Racetrack: Efficient detection of data race conditions via adaptive tracking. In SOSP, 2005.
[69]
Jyh-shiarn Yur, Barbara G. Ryder, and William A. Landi. An incremental flow- and context-sensitive pointer aliasing analysis. In ICSE, 1999.
[70]
Wei Zhang, Junghee Lim, Ramya Olichandran, Joel Scherpelz, Guoliang Jin, Shan Lu, and Thomas Reps. ConSeq: detecting concurrency bugs through sequential errors. In ASPLOS, 2011.
[71]
Wei Zhang, Chong Sun, and Shan Lu. ConMem: Detecting severe concurrency bugs through an effectoriented approach. In ASPLOS, 2010.

Cited By

View all
  • (2024)An Adaptive Logging System (ALS): Enhancing Software Logging with Reinforcement Learning TechniquesProceedings of the 15th ACM/SPEC International Conference on Performance Engineering10.1145/3629526.3645033(37-47)Online publication date: 7-May-2024
  • (2024)Understanding and Detecting Real-World Safety Issues in RustIEEE Transactions on Software Engineering10.1109/TSE.2024.338039350:6(1306-1324)Online publication date: Jun-2024
  • (2024)TCSA: Efficient Localization of Busy-Wait Synchronization Bugs for Latency-Critical ApplicationsIEEE Transactions on Parallel and Distributed Systems10.1109/TPDS.2023.334257335:2(297-309)Online publication date: Feb-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ESEC/FSE 2015: Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering
August 2015
1068 pages
ISBN:9781450336758
DOI:10.1145/2786805
Permission to make digital or hard copies of part or all 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 third-party components of this work must be honored. For all other uses, contact the Owner/Author.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 30 August 2015

Check for updates

Author Tags

  1. Concurrency Bugs
  2. Empirical Study
  3. Locks
  4. Multi-Threaded Software
  5. Performance Bugs
  6. Repository Mining

Qualifiers

  • Research-article

Funding Sources

Conference

ESEC/FSE'15
Sponsor:

Acceptance Rates

Overall Acceptance Rate 112 of 543 submissions, 21%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)81
  • Downloads (Last 6 weeks)12
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)An Adaptive Logging System (ALS): Enhancing Software Logging with Reinforcement Learning TechniquesProceedings of the 15th ACM/SPEC International Conference on Performance Engineering10.1145/3629526.3645033(37-47)Online publication date: 7-May-2024
  • (2024)Understanding and Detecting Real-World Safety Issues in RustIEEE Transactions on Software Engineering10.1109/TSE.2024.338039350:6(1306-1324)Online publication date: Jun-2024
  • (2024)TCSA: Efficient Localization of Busy-Wait Synchronization Bugs for Latency-Critical ApplicationsIEEE Transactions on Parallel and Distributed Systems10.1109/TPDS.2023.334257335:2(297-309)Online publication date: Feb-2024
  • (2023)Place your locks wellProceedings of the 32nd USENIX Conference on Security Symposium10.5555/3620237.3620446(3727-3744)Online publication date: 9-Aug-2023
  • (2023)Bash in the Wild: Language Usage, Code Smells, and BugsACM Transactions on Software Engineering and Methodology10.1145/351719332:1(1-22)Online publication date: 13-Feb-2023
  • (2022)Automated Identification of Performance Changes at Code Level2022 IEEE 22nd International Conference on Software Quality, Reliability and Security (QRS)10.1109/QRS57517.2022.00096(916-925)Online publication date: Dec-2022
  • (2022)Lock Contention Performance Classification for Java Intrinsic LocksRuntime Verification10.1007/978-3-031-17196-3_16(274-282)Online publication date: 28-Sep-2022
  • (2020)Achieving Determinism in Adaptive AUTOSAR2020 Design, Automation & Test in Europe Conference & Exhibition (DATE)10.23919/DATE48585.2020.9116430(822-827)Online publication date: Mar-2020
  • (2020)Symbolic Reasoning for Automatic Signal PlacementACM SIGOPS Operating Systems Review10.1145/3421473.342148254:1(64-76)Online publication date: 31-Aug-2020
  • (2020)Understanding memory and thread safety practices and issues in real-world Rust programsProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3385412.3386036(763-779)Online publication date: 11-Jun-2020
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media