ABSTRACT
Faults introduced by races are difficult to detect because they usually occur only under specific execution interleavings. Numerous program analysis and testing techniques have been proposed to detect races between threads. Little work, however, has addressed the problem of detecting and testing for process-level races, in which two processes access a shared resource without proper synchronization. In this paper, we present SIMRACER, a novel testing-based framework that allows engineers to effectively test for process-level races. SIMRACER first computes potential races based on runtime traces obtained by running existing tests on target processes, and then it controls process scheduling relative to the potential races so that real races can be created. We implemented SIMRACER on a commercial virtual platform that is widely used to support hardware/software co-design. We then evaluated its effectiveness on sixteen real-world applications containing known process-level races. Our results show that SIMRACER is effective at detecting process-level races, and more effective than traditional stress testing techniques at detecting faults caused by those races.
- Android Race, 2010. https://android.googlesource.com/platform/frameworks- /base/+/e6b1bbd8acca3f6e174c24cf4eb23a66db2d08a2.Google Scholar
- Apache Deadlock, 2003. http://marc.info/?l=apache-httpdbugs&m=105967988713871.Google Scholar
- M. D. Bond, K. E. Coons, and K. S. McKinley. PACER: Proportional detection of data races. In ACM SIGPLAN Conf. Prog. Land. Des. Impl., 2010. Google ScholarDigital Library
- 2004. https://bugs.launchpad.net/debian/+source/bash /+bug/10809/comments/0.Google Scholar
- 2008. http://ftp.gnu.org/gnu/bash/bash-3.2-patches/ bash32-051.Google Scholar
- 2011. http://ftp.gnu.org/gnu/bash/bash-4.2-patches/ bash42-023.Google Scholar
- 2011. http://www.mail-archive.com/[email protected]/msg918886.html.Google Scholar
- 2000. http://bugs.debian.org/cgi-bin/bugreport.cgi ?bug=67782.Google Scholar
- 2011. http://bugs.debian.org/cgi-bin/bugreport.cgi ?bug=461585.Google Scholar
- 2010. https://rhn.redhat.com/errata/RHBA-2010-0174.html.Google Scholar
- 2008. https://bugzilla.redhat.com/show_bug.cgi?id=438076.Google Scholar
- 2004. http://lists.gnu.org/archive/html/bug-coreutils/2004- 04/msg00126.html.Google Scholar
- 2001. https://bugzilla.redhat.com/show_bug.cgi?id=54127.Google Scholar
- 2006. http://bugs.debian.org/cgi-bin/bugreport.cgi ?bug=357140.Google Scholar
- 2005. http://www.securityfocus.com/archive/1/395489.Google Scholar
- 2007. https://bugs.launchpad.net/ubuntu/+source /coreutils/5.97-5.6ubuntu1.Google Scholar
- 2009. https://bugs.gentoo.org/show_bug.cgi?id=231775.Google Scholar
- A. Causevic, D. Sundmark, and S. Punnekkat. An industrial survey on contemporary aspects of softw. test. In Int’l. Conf. Softw. Test., Verif. Valid., 2010. Google ScholarDigital Library
- J. Engblom, D. Aarno, and B. Werner. Full-System Simulation from Embedded to High-Performance Systems. 2010.Google Scholar
- D. Engler and K. Ashcraft. RacerX: Effective, static detection of race conditions and deadlocks. In ACM Symp. Op. Sys. Princ., 2003. Google ScholarDigital Library
- K.-H. K. Guy Martin Tchamgoue, Ok-Kyoon Ha and Y.-K. Jun. Lightweight labeling scheme for on-the-fly race detection of signal handlers. Ubiq. Comp. Multim. Apps., 2011.Google Scholar
- B. Kasikci, C. Zamfir, and G. Candea. Data races vs. data race bugs: telling the difference with portend. In Int’l. Conf. Arch. Sup. Prog. Langs. Op. Sys., 2012. Google ScholarDigital Library
- O. Laadan, N. Viennot, C.-C. Tsai, C. Blinn, J. Yang, and J. Nieh. Pervasive detection of process races in deployed systems. In ACM Symp. Op. Sys. Princ., 2011. Google ScholarDigital Library
- D. Li, W. Srisa-an, and M. B. Dwyer. Sos: Saving time in dynamic race detection with stationary analysis. In Int’l. Conf. O.-O. Prog. Sys. Langs. Apps., 2011. Google ScholarDigital Library
- S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from mistakes: A comprehensive study on real world concurrency bug characteristics. In Int’l. Conf. Arch. Sup. Prog. Langs. Op. Sys., 2008. Google ScholarDigital Library
- M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In Conf. Op. Sys. Des. Impl, 2008. Google ScholarDigital Library
- S. Narayanasamy, Z. Wang, J. Tigani, A. Edwards, and B. Calder. Automatically classifying benign and harmful data races using replay analysis. In ACM SIGPLAN Conf. Prog. Lang. Des. Impl, 2007. Google ScholarDigital Library
- Facebook IPO Glitch, 2012. http://www.cio.com.au/article/425234/ nasdaq_facebook_glitch_came_from_race_conditions/.Google Scholar
- T. J. Ostrand and M. J. Balcer. The category-partition method for specifying and generating fuctional tests. Comm. ACM, June 1988. Google ScholarDigital Library
- S. Park, S. Lu, and Y. Zhou. CTrigger: Exposing atomicity violation bugs from their hiding places. In Int’l. Conf. Arch. Sup. Prog. Langs. Op. Sys., 2009. Google ScholarDigital Library
- S. Park, R. W. Vuduc, and M. J. Harrold. Falcon: Fault localization in concurrent programs. In Int’l. Conf. Softw. Eng., 2010. Google ScholarDigital Library
- M. Payer and T. R. Gross. Protecting applications against tocttou races by user-space caching of file metadata. In Int’l. Conf. Virt. Exe. Envs., 2012. Google ScholarDigital Library
- R. Raman, J. Zhao, V. Sarkar, M. Vechev, and E. Yahav. Scalable and precise dynamic datarace detection for structured parallelism. In ACM SIGPLAN Conf. Prog. Lang. Des. Impl, 2012. Google ScholarDigital Library
- K. Sen. Race directed random testing of concurrent programs. In ACM SIGPLAN Conf. Prog. Lang. Des. Impl, 2008. Google ScholarDigital Library
- K. Serebryany and T. Iskhodzhanov. Threadsanitizer: data race detection in practice. In W. Binary Instr. Apps., 2009. Google ScholarDigital Library
- T. Sheng, N. Vachharajani, S. Eranian, R. Hundt, W. Chen, and W. Zheng. RACEZ: A lightweight and non-invasive race detection tool for production applications. In Int’l. Conf. Softw. Eng., 2011. Google ScholarDigital Library
- Test Strategies for Smartphones and Mobile Devices, 2010. http://www.macadamian.com/images/uploads/whitepapers- /MobileTestStrategies_Aug2010.pdf.Google Scholar
- F. Sorrentino, A. Farzan, and P. Madhusudan. Penelope: weaving threads to expose atomicity violations. In Int’l. Symp. Found. Softw. Eng., 2010. Google ScholarDigital Library
- M. Staats, M. W. Whalen, and M. P. Heimdahl. Programs, tests, and oracles: The foundations of testing revisited. In Int’l. Conf. Softw. Eng., 2011. Google ScholarDigital Library
- Stress Testing, 2006. http://msdn.microsoft.com/en-us /magazine/cc163613.aspx.Google Scholar
- T. Tahara, K. Gondow, and S. Ohsuga. DRACULA: Detector of data races in signals handlers. In Asia-Pacific Softw. Eng. Conf., 2008. Google ScholarDigital Library
- D. Tsafrir, T. Hertz, D. Wagner, and D. Da Silva. Portably solving file TOCTTOU races with hardness amplification. In USENIX Conf. File Stor. Tech., 2008. Google ScholarDigital Library
- UART Race, 2011. http://lkml.org/lkml/2011/7/25/369.Google Scholar
- Web Site Test Tools and Site Management Tools, 2012. http://www.softwareqatest.com/qatweb1.html.Google Scholar
- J. Yu, S. Narayanasamy, C. Pereira, and G. Pokam. Maple: a coverage-driven testing tool for multithreaded programs. In ACM Int’l. Conf. O.-O. Prog. Sys. Langs. Apps., 2012. Google ScholarDigital Library
- T. Yu, W. Srisa-an, and G. Rothermel. Simtester: a controllable and observable testing framework for embedded systems. In Int’l. Conf. Virt. Exe. Envs., 2012. Google ScholarDigital Library
- T. Yu, A. Sung, W. Srisa-an, and G. Rothermel. Using property-based oracles when testing embedded system applications. In Int’l. Conf. Softw. Test., Verif. Val., 2011. 11 Google ScholarDigital Library
Index Terms
- SimRacer: an automated framework to support testing for process-level races
Recommendations
SimRT: an automated framework to support regression testing for data races
ICSE 2014: Proceedings of the 36th International Conference on Software EngineeringConcurrent programs are prone to various classes of difficult-to-detect faults, of which data races are particularly prevalent. Prior work has attempted to increase the cost-effectiveness of approaches for testing for data races by employing race ...
Healing data races on-the-fly
PADTAD '07: Proceedings of the 2007 ACM workshop on Parallel and distributed systems: testing and debuggingTesting of concurrent software is extremely difficult. Despite all the progress in the testing and verification technology, concurrent bugs, the most common of which are deadlocks and races, make it to the field. This paper describes a set of techniques,...
Testing atomicity of composed concurrent operations
OOPSLA '11: Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applicationsWe address the problem of testing atomicity of composed concurrent operations. Concurrent libraries help programmers exploit parallel hardware by providing scalable concurrent operations with the illusion that each operation is executed atomically. ...
Comments