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

Greybox Fuzzing for Concurrency Testing

Published: 27 April 2024 Publication History

Abstract

Uncovering bugs in concurrent programs is a challenging problem owing to the exponentially large search space of thread interleavings. Past approaches towards concurrency testing are either optimistic --- relying on random sampling of these interleavings --- or pessimistic --- relying on systematic exploration of a reduced (bounded) search space. In this work, we suggest a fresh, pragmatic solution neither focused only on formal, systematic testing, nor solely on unguided sampling or stress-testing approaches. We employ a biased random search which guides exploration towards neighborhoods which will likely expose new behavior. As such it is thematically similar to greybox fuzz testing, which has proven to be an effective technique for finding bugs in sequential programs. To identify new behaviors in the domain of interleavings, we prune and navigate the search space using the "reads-from" relation. Our approach is significantly more efficient at finding bugs per schedule exercised than other state-of-the art concurrency testing tools and approaches. Experiments on widely used concurrency datasets also show that our greybox fuzzing inspired approach gives a strict improvement over a randomized baseline scheduling algorithm in practice via a more uniform exploration of the schedule space. We make our concurrency testing infrastructure "Reads-From Fuzzer" (RFF) available for experimentation and usage by the wider community to aid future research.

References

[1]
Parosh Abdulla, Stavros Aronis, Bengt Jonsson, and Konstantinos Sagonas. Optimal dynamic partial order reduction. ACM SIGPLAN Notices, 49(1):373--384, 2014.
[2]
Parosh Aziz Abdulla, Mohamed Faouzi Atig, Bengt Jonsson, Magnus Lång, Tuan Phong Ngo, and Konstantinos Sagonas. Optimal stateless model checking for reads-from equivalence under sequential consistency. Proceedings of the ACM on Programming Languages, 3(OOPSLA):1--29, 2019.
[3]
Sarita Adve. Data races are evil with no exceptions: Technical perspective. Commun. ACM, 53(11):84, nov 2010.
[4]
Pratyush Agarwal, Krishnendu Chatterjee, Shreya Pathak, Andreas Pavlogiannis, and Viktor Toman. Stateless model checking under a reads-value-from equivalence. In International Conference on Computer Aided Verification, pages 341--366. Springer, 2021.
[5]
American fuzzy lop (AFL). https://github.com/google/AFL.
[6]
Zhendong Ang and Umang Mathur. Predictive monitoring against pattern regular languages. Proc. ACM Program. Lang., 8(POPL), jan 2024.
[7]
Stavros Aronis, Bengt Jonsson, Magnus Lång, and Konstantinos Sagonas. Optimal dynamic partial order reduction with observers. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 229--248. Springer, 2018.
[8]
Jinsheng Ba, Gregory J. Duck, and Abhik Roychoudhury. Efficient greybox fuzzing to detect memory errors. In Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering. Association for Computing Machinery, 2023.
[9]
Tom Bergan, Owen Anderson, Joseph Devietti, Luis Ceze, and Dan Grossman. Coredet: A compiler and runtime system for deterministic multithreaded execution. In Proceedings of the Fifteenth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS XV, page 53--64, New York, NY, USA, 2010. Association for Computing Machinery.
[10]
Tim Blazytko, Matt Bishop, Cornelius Aschermann, Justin Cappos, Moritz Schlögel, Nadia Korshun, Ali Abbasi, Marco Schweighauser, Sebastian Schinzel, Sergej Schumilo, et al. {GRIMOIRE}: Synthesizing structure while fuzzing. In 28th USENIX Security Symposium (USENIX Security 19), pages 1985--2002, 2019.
[11]
Hans-J. Boehm. Position paper: Nondeterminism is unavoidable, but data races are pure evil. In Proceedings of the 2012 ACM Workshop on Relaxing Synchronization for Multicore and Manycore Scalability, RACES '12, page 9--14, New York, NY, USA, 2012. Association for Computing Machinery.
[12]
Marcel Böhme, Van-Thuan Pham, and Abhik Roychoudhury. Coverage-based greybox fuzzing as markov chain. In ACM SIGSAC Conference on Computer and Communications Security (CCS), 2016.
[13]
Sebastian Burckhardt, Pravesh Kothari, Madanlal Musuvathi, and Santosh Nagarakatte. A randomized scheduler with probabilistic guarantees of finding bugs. ACM SIGARCH Computer Architecture News, 38(1):167--178, 2010.
[14]
Hongxu Chen, Shengjian Guo, Yinxing Xue, Yulei Sui, Cen Zhang, Yuekang Li, Haijun Wang, and Yang Liu. {MUZZ}: Thread-aware grey-box fuzzing for effective bug hunting in multithreaded programs. In 29th USENIX Security Symposium (USENIX Security 20), pages 2325--2342, 2020.
[15]
Edmund Clarke, Daniel Kroening, and Flavio Lerda. A tool for checking ansi-c programs. In Tools and Algorithms for the Construction and Analysis of Systems: 10th International Conference, TACAS 2004, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2004, Barcelona, Spain, March 29-April 2, 2004. Proceedings 10, pages 168--176. Springer, 2004.
[16]
Lucas Cordeiro and Bernd Fischer. Verifying multi-threaded software using smt-based context-bounded model checking. In Proceedings of the 33rd International Conference on Software Engineering, pages 331--340, 2011.
[17]
Cve benchmark. https://github.com/mryancai/ConVul, 2019. Accessed: 2023-07-01.
[18]
Pantazis Deligiannis, Aditya Senthilnathan, Fahad Nayyar, Chris Lovett, and Akash Lal. Industrial-strength controlled concurrency testing for c# programs with coyote. In Tools and Algorithms for the Construction and Analysis of Systems: 29th International Conference, TACAS 2023, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022, Paris, France, April 22--27, 2023, Proceedings, Part II, page 433--452, Berlin, Heidelberg, 2023. Springer-Verlag.
[19]
Gregory J Duck, Xiang Gao, and Abhik Roychoudhury. Binary rewriting without control flow recovery. In ACM SIGPLAN Sympsoium on Programming Language Design and Implementation (PLDI), 2020.
[20]
Azadeh Farzan, Andreas Holzer, Niloofar Razavi, and Helmut Veith. Con2colic testing. In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering, pages 37--47, 2013.
[21]
Cormac Flanagan and Patrice Godefroid. Dynamic partial-order reduction for model checking software. ACM Sigplan Notices, 40(1):110--121, 2005.
[22]
Mingyu Gao, Soham Chakraborty, and Burcu Kulahcioglu Ozkan. Probabilistic concurrency testing for weak memory programs. In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2, pages 603--616, 2023.
[23]
Xiang Gao, Gregory J. Duck, and Abhik Roychoudhury. Scalable fuzzing of program binaries with e9afl. In Proceedings of the 36th IEEE/ACM International Conference on Automated Software Engineering, page 1247--1251. IEEE Press, 2022.
[24]
Patrice Godefroid. Partial-order methods for the verification of concurrent systems: an approach to the state-explosion problem. Springer, 1996.
[25]
Patrice Godefroid. Software model checking: The verisoft approach. Formal Methods in System Design, 26:77--101, 2005.
[26]
Patrice Godefroid, Bo-Yuan Huang, and Marina Polishchuk. Intelligent rest api data fuzzing. In Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering, pages 725--736, 2020.
[27]
Sishuai Gong, Deniz Altinbüken, Pedro Fonseca, and Petros Maniatis. Snowboard: Finding kernel concurrency bugs through systematic inter-thread communication analysis. In Proceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles, SOSP '21, page 66--83, New York, NY, USA, 2021. Association for Computing Machinery.
[28]
Jeff Huang, Qingzhou Luo, and Grigore Rosu. Gpredict: Generic predictive concurrency analysis. In Antonia Bertolino, Gerardo Canfora, and Sebastian G. Elbaum, editors, 37th IEEE/ACM International Conference on Software Engineering, ICSE 2015, Florence, Italy, May 16-24, 2015, Volume 1, pages 847--857. IEEE Computer Society, 2015.
[29]
Nicholas Jalbert, Cristiano Pereira, Gilles Pokam, and Koushik Sen. {RADBench}: A concurrency bug benchmark suite. In 3rd USENIX Workshop on Hot Topics in Parallelism (HotPar 11), 2011.
[30]
Yuseok Jeon, Wookhyun Han, Nathan Burow, and Mathias Payer. Fuzzan: Efficient sanitizer metadata design for fuzzing. In Proceedings of the 2020 USENIX Conference on Usenix Annual Technical Conference. USENIX Association, 2020.
[31]
Dae R Jeong, Kyungtae Kim, Basavesh Shivakumar, Byoungyoung Lee, and Insik Shin. Razzer: Finding kernel race bugs through fuzzing. In 2019 IEEE Symposium on Security and Privacy (SP), pages 754--768. IEEE, 2019.
[32]
Zu-Ming Jiang, Jia-Ju Bai, Kangjie Lu, and Shi-Min Hu. Context-sensitive and directional concurrency fuzzing for data-race detection. In Network and Distributed Systems Security (NDSS) Symposium 2022, 2022.
[33]
Dileep Kini, Umang Mathur, and Mahesh Viswanathan. Dynamic race prediction in linear time. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2017, page 157--170, New York, NY, USA, 2017. Association for Computing Machinery.
[34]
George Klees, Andrew Ruef, Benji Cooper, Shiyi Wei, and Michael Hicks. Evaluating fuzz testing. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, pages 2123--2138, 2018.
[35]
Youngjoo Ko, Bin Zhu, and Jong Kim. Fuzzing with automatically controlled interleavings to detect concurrency bugs. Journal of Systems and Software, 191:111379, 2022.
[36]
Michalis Kokologiannakis, Iason Marmanis, Vladimir Gladstein, and Viktor Vafeiadis. Truly stateless, optimal dynamic partial order reduction. Proceedings of the ACM on Programming Languages, 6(POPL):1--28, 2022.
[37]
Michalis Kokologiannakis, Azalea Raad, and Viktor Vafeiadis. Model checking for weakly consistent libraries. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 96--110, 2019.
[38]
Michalis Kokologiannakis and Viktor Vafeiadis. Genmc: A model checker for weak memory models. In International Conference on Computer Aided Verification, pages 427--440. Springer, 2021.
[39]
Tongping Liu, Charlie Curtsinger, and Emery D. Berger. Dthreads: Efficient deterministic multithreading. In Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles, page 327--336. Association for Computing Machinery, 2011.
[40]
Weiyu Luo and Brian Demsky. C11tester: a race detector for c/c++ atomics. In Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pages 630--646, 2021.
[41]
Nathan Mantel et al. Evaluation of survival data and two new rank order statistics arising in its consideration. Cancer Chemother Rep, 50(3):163--170, 1966.
[42]
Umang Mathur, Dileep Kini, and Mahesh Viswanathan. What happens-after the first race? enhancing the predictive power of happens-before based dynamic race detection. Proceedings of the ACM on Programming Languages, 2(OOPSLA):1--29, 2018.
[43]
Umang Mathur, Andreas Pavlogiannis, and Mahesh Viswanathan. Optimal prediction of synchronization-preserving races. Proceedings of the ACM on Programming Languages, 5(POPL):1--29, 2021.
[44]
Umang Mathur and Mahesh Viswanathan. Atomicity checking in linear time using vector clocks. In Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS '20, page 183--199, New York, NY, USA, 2020. Association for Computing Machinery.
[45]
Suvam Mukherjee, Pantazis Deligiannis, Arpita Biswas, and Akash Lal. Learning-based controlled concurrency testing. Proceedings of the ACM on Programming Languages, 4(OOPSLA):1--31, 2020.
[46]
Madanlal Musuvathi, Shaz Qadeer, Thomas Ball, Gerard Basler, Piramanayagam Arumuga Nainar, and Iulian Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation, OSDI'08, page 267--280, USA, 2008. USENIX Association.
[47]
Santosh Nagarakatte, Sebastian Burckhardt, Milo MK Martin, and Madanlal Musuvathi. Multicore acceleration of priority-based schedulers for concurrency bug detection. In Proceedings of the 33rd ACM SIGPLAN conference on Programming Language Design and Implementation, pages 543--554, 2012.
[48]
Marek Olszewski, Jason Ansel, and Saman Amarasinghe. Kendo: Efficient deterministic multithreading in software. In Proceedings of the 14th International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS XIV, page 97--108, New York, NY, USA, 2009. Association for Computing Machinery.
[49]
Burcu Kulahcioglu Ozkan, Rupak Majumdar, Filip Niksic, Mitra Tabaei Befrouei, and Georg Weissenbacher. Randomized testing of distributed systems with probabilistic guarantees. Proceedings of the ACM on Programming Languages, 2(OOPSLA):1--28, 2018.
[50]
Burcu Kulahcioglu Ozkan, Rupak Majumdar, and Simin Oraee. Trace aware random testing for distributed systems. Proceedings of the ACM on Programming Languages, 3(OOPSLA):1--29, 2019.
[51]
Andreas Pavlogiannis. Fast, sound, and effectively complete dynamic race prediction. Proceedings of the ACM on Programming Languages, 4(POPL):1--29, 2019.
[52]
Doron Peled. All from one, one for all: on model checking using representatives. In 5th International Conference on Computer Aided Verification (CAV), 1993.
[53]
Jing Peng and Ronald J Williams. Incremental multi-step q-learning. In Machine Learning Proceedings 1994, pages 226--232. Elsevier, 1994.
[54]
Van-Thuan Pham, Marcel Böhme, Andrew Edward Santosa, Alexandru Razvan Caciulescu, and Abhik Roychoudhury. Smart greybox fuzzing. IEEE Transactions on Software Engineering, 2019.
[55]
Shaz Qadeer and Jakob Rehof. Context-bounded model checking of concurrent software. In Nicolas Halbwachs and Lenore D. Zuck, editors, Tools and Algorithms for the Construction and Analysis of Systems, 11th International Conference, TACAS 2005, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2005, Edinburgh, UK, April 4-8, 2005, Proceedings, volume 3440 of Lecture Notes in Computer Science, pages 93--107. Springer, 2005.
[56]
Niloofar Razavi, Franjo Ivančić, Vineet Kahlon, and Aarti Gupta. Concurrent test generation using concolic multi-trace analysis. In Asian Symposium on Programming Languages and Systems, pages 239--255. Springer, 2012.
[57]
Jake Roemer, Kaan Genç, and Michael D Bond. Smarttrack: efficient predictive race detection. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 747--762, 2020.
[58]
Sctbench: a set of c/c++ pthread benchmarks for evaluating concurrency testing techniques. https://github.com/mc-imperial/sctbench, 2016. Accessed: 2023-07-01.
[59]
Koushik Sen. Effective random testing of concurrent programs. In Proceedings of the 22nd IEEE/ACM international conference on Automated software engineering, pages 323--332, 2007.
[60]
Koushik Sen. Race directed random testing of concurrent programs. In 29th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2008.
[61]
Koushik Sen and Gul Agha. A race-detection and flipping algorithm for automated testing of multi-threaded programs. In Haifa verification conference, pages 166--182. Springer, 2006.
[62]
Konstantin Serebryany and Timur Iskhodzhanov. Threadsanitizer: Data race detection in practice. In Proceedings of the Workshop on Binary Instrumentation and Applications, WBIA '09, page 62--71, New York, NY, USA, 2009. Association for Computing Machinery.
[63]
Konstantin Serebryany, Alexander Potapenko, Timur Iskhodzhanov, and Dmitriy Vyukov. Dynamic race detection with llvm compiler. In Sarfraz Khurshid and Koushik Sen, editors, Runtime Verification, pages 110--114, Berlin, Heidelberg, 2012. Springer Berlin Heidelberg.
[64]
Yannis Smaragdakis, Jacob Evans, Caitlin Sadowski, Jaeheon Yi, and Cormac Flanagan. Sound predictive race detection in polynomial time. In Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '12, page 387--400, New York, NY, USA, 2012. Association for Computing Machinery.
[65]
Ole Tange et al. Gnu parallel-the command-line power tool. The USENIX Magazine, 36(1):42--47, 2011.
[66]
Hünkar Can Tunç, Umang Mathur, Andreas Pavlogiannis, and Mahesh Viswanathan. Sound dynamic deadlock prediction in linear time. Proc. ACM Program. Lang., 7(PLDI), jun 2023.
[67]
Cheng Wen, Mengda He, Bohao Wu, Zhiwu Xu, and Shengchao Qin. Controlled concurrency testing via periodical scheduling. In Proceedings of the 44th International Conference on Software Engineering, pages 474--486, 2022.
[68]
Steven Cameron Woo, Moriyoshi Ohara, Evan Torrie, Jaswinder Pal Singh, and Anoop Gupta. The splash-2 programs: Characterization and methodological considerations. ACM SIGARCH computer architecture news, 23(2):24--36, 1995.
[69]
Meng Xu, Sanidhya Kashyap, Hanqing Zhao, and Taesoo Kim. Krace: Data race fuzzing for kernel file systems. In 2020 IEEE Symposium on Security and Privacy (SP), pages 1643--1660. IEEE, 2020.
[70]
Yu Yang, Xiaofang Chen, and Ganesh Gopalakrishnan. Inspect: A runtime model checker for multithreaded c programs. Technical report, Technical Report UUCS-08-004, University of Utah, 2008.
[71]
Jie Yu and Satish Narayanasamy. A case for an interleaving constrained shared-memory multi-processor. ACM SIGARCH Computer Architecture News, 37(3):325--336, 2009.
[72]
Jie Yu, Satish Narayanasamy, Cristiano Pereira, and Gilles Pokam. Maple: A coverage-driven testing tool for multithreaded programs. In Proceedings of the ACM international conference on Object oriented programming systems languages and applications, pages 485--502, 2012.
[73]
Xinhao Yuan and Junfeng Yang. Effective concurrency testing for distributed systems. In Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems, pages 1141--1156, 2020.
[74]
Xinhao Yuan, Junfeng Yang, and Ronghui Gu. Partial order aware concurrency sampling. In Computer Aided Verification: 30th International Conference, CAV 2018, Held as Part of the Federated Logic Conference, FloC 2018, Oxford, UK, July 14-17, 2018, Proceedings, Part II 30, pages 317--335. Springer, 2018.

Cited By

View all
  • (2025)The Decision Problem for Regular First Order TheoriesProceedings of the ACM on Programming Languages10.1145/37048709:POPL(986-1012)Online publication date: 9-Jan-2025
  • (2024)Race Directed Fuzzing for More Effective Concurrency TestingProceedings of the 2024 The 6th World Symposium on Software Engineering (WSSE)10.1145/3698062.3698063(1-6)Online publication date: 13-Sep-2024
  • (2024)OZZ: Identifying Kernel Out-of-Order Concurrency Bugs with In-Vivo Memory Access ReorderingProceedings of the ACM SIGOPS 30th Symposium on Operating Systems Principles10.1145/3694715.3695944(229-248)Online publication date: 4-Nov-2024

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ASPLOS '24: Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2
April 2024
1299 pages
ISBN:9798400703850
DOI:10.1145/3620665
This work is licensed under a Creative Commons Attribution International 4.0 License.

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 27 April 2024

Check for updates

Badges

Qualifiers

  • Research-article

Funding Sources

Conference

ASPLOS '24

Acceptance Rates

Overall Acceptance Rate 535 of 2,713 submissions, 20%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)728
  • Downloads (Last 6 weeks)140
Reflects downloads up to 13 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2025)The Decision Problem for Regular First Order TheoriesProceedings of the ACM on Programming Languages10.1145/37048709:POPL(986-1012)Online publication date: 9-Jan-2025
  • (2024)Race Directed Fuzzing for More Effective Concurrency TestingProceedings of the 2024 The 6th World Symposium on Software Engineering (WSSE)10.1145/3698062.3698063(1-6)Online publication date: 13-Sep-2024
  • (2024)OZZ: Identifying Kernel Out-of-Order Concurrency Bugs with In-Vivo Memory Access ReorderingProceedings of the ACM SIGOPS 30th Symposium on Operating Systems Principles10.1145/3694715.3695944(229-248)Online publication date: 4-Nov-2024

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media