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

Automated atomicity-violation fixing

Published: 04 June 2011 Publication History
  • Get Citation Alerts
  • Abstract

    Fixing software bugs has always been an important and time-consuming process in software development. Fixing concurrency bugs has become especially critical in the multicore era. However, fixing concurrency bugs is challenging, in part due to non-deterministic failures and tricky parallel reasoning. Beyond correctly fixing the original problem in the software, a good patch should also avoid introducing new bugs, degrading performance unnecessarily, or damaging software readability. Existing tools cannot automate the whole fixing process and provide good-quality patches.
    We present AFix, a tool that automates the whole process of fixing one common type of concurrency bug: single-variable atomicity violations. AFix starts from the bug reports of existing bug-detection tools. It augments these with static analysis to construct a suitable patch for each bug report. It further tries to combine the patches of multiple bugs for better performance and code readability. Finally, AFix's run-time component provides testing customized for each patch. Our evaluation shows that patches automatically generated by AFix correctly eliminate six out of eight real-world bugs and significantly decrease the failure probability in the other two cases. AFix patches never introduce new bugs and usually have similar performance to manually-designed patches.

    References

    [1]
    A. Aviram, S.-C. Weng, S. Hu, and B. Ford. Efficient system-enforced deterministic parallelism. In OSDI, 2010.
    [2]
    T. Bergan, N. Hunt, L. Ceze, and S. D. Gribble. Deterministic process groups in dOS. In OSDI, 2010.
    [3]
    E. D. Berger, T. Yang, T. Liu, and G. Novark. Grace: safe multithreaded programming for C/C. In OOPSLA, 2009.
    [4]
    M. D. Bond, K. E. Coons, and K. S. McKinley. Pacer: Proportional detection of data races. In PLDI, 2010.
    [5]
    L. Chew and D. Lie. Kivati: fast detection and prevention of atomicity violations. In EuroSys, 2010.
    [6]
    J.-D. Choi, K. Lee, A. Loginov, R. O'Callahan, V. Sarkar, and M. Sridharan. Efficient and precise datarace detection for multithreaded object-oriented programs. In PLDI, 2002.
    [7]
    C. Cowan, H. Hinton, C. Pu, and J. Walpole. The cracker patch choice: An analysis of post hoc security techniques. In In Proceedings of the National Information Systems Security Conference (NISSC), 2000.
    [8]
    J. Deshmukh, G. Ramalingam, V. P. Ranganath, and K. Vaswani. Logical concurrency control from sequential proofs. In European Symposium on Programming, 2010.
    [9]
    C. Flanagan and S. N. Freund. Atomizer: a dynamic atomicity checker for multithreaded programs. In POPL, 2004.
    [10]
    C. Flanagan and S. N. Freund. FastTrack: efficient and precise dynamic race detection. In PLDI, 2009.
    [11]
    M. Harman. Automated patching techniques: the fix is in: technical perspective. Commun. ACM, 53 (5): 108--108, 2010. ISSN 0001-0782. http://doi.acm.org/10.1145/1735223.1735248.
    [12]
    G. Jin, A. Thakur, B. Liblit, and S. Lu. Instrumentation and sampling strategies for Cooperative Concurrency Bug Isolation. In OOPSLA, 2010.
    [13]
    H. Jula, D. Tralamazza, C. Zamfir, and G. Candea. Deadlock immunity: Enabling systems to defend against deadlocks. In OSDI, 2008.
    [14]
    E. Kandrot and B. Eich. Our JavaScript is 3x slower than IE's, Sept. 2000. URL https://bugzilla.mozilla.org/show_bug.cgi?id=54743.
    [15]
    B. Krebs. A time to patch II: Mozilla. The Washington Post Security Fix blog, http://voices.washingtonpost.com/securityfix/2006/02/a_time_to_patch_ii_mozilla.html.
    [16]
    B. Krena, Z. Letko, R. Tzoref, S. Ur, and T. Vojnar. Healing data races on-the-fly. In PADTAD, 2007.
    [17]
    C. Lattner and V. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In CGO, 2004.
    [18]
    Z. Letko, T. Vojnar, and B. Křena. AtomRace: data race and atomicity violation detector and healer. In PADTAD, 2008.
    [19]
    S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: Detecting atomicity violations via access-interleaving invariants. In ASPLOS, 2006.
    [20]
    S. Lu, S. Park, E. Seo, and Y. Zhou. Learning from mistakes -- a comprehensive study of real world concurrency bug characteristics. In ASPLOS, Mar. 2008.
    [21]
    B. Lucia, J. Devietti, L. Ceze, and K. Strauss. Atom-Aid: Detecting and surviving atomicity violations. IEEE Micro, 29 (1), 2009.
    [22]
    C.-K. Luk, R. Cohn, R. Muth, H. Patil, A. Klauser, G. Lowney, S. Wallace, V. J. Reddi, and K. Hazelwood. Pin: building customized program analysis tools with dynamic instrumentation. In PLDI, 2005.
    [23]
    B. McCloskey, F. Zhou, D. Gay, and E. Brewer. Autolocker: synchronization inference for atomic sections. In POPL, 2006.
    [24]
    Microsoft. Revamping the microsoft security bulletin release process, Feb. 2005. URL http://www.microsoft.com/technet/security/bulletin/revsbwp.mspx.
    [25]
    S. Park, S. Lu, and Y. Zhou. CTrigger: exposing atomicity violation bugs from their hiding places. In ASPLOS, 2009.
    [26]
    S. Park, R. W. Vuduc, and M. J. Harrold. Falcon: fault localization in concurrent programs. In ICSE, 2010.
    [27]
    R. Pegoraro. Apple updates Leopard--again. Washington Post, Feb. 2008.
    [28]
    J. H. Perkins, S. Kim, S. Larsen, S. P. Amarasinghe, J. Bachrach, M. Carbin, C. Pacheco, F. Sherwood, S. Sidiroglou, G. Sullivan, W.-F. Wong, Y. Zibin, M. D. Ernst, and M. C. Rinard. Automatically patching errors in deployed software. In SOSP, 2009.
    [29]
    K. Poulsen. Software bug contributed to blackout. SecurityFocus, Feb. 2004. URL http://www.securityfocus.com/news/8016.
    [30]
    P. Ratanaworabhan, M. Burtscher, D. Kirovski, B. Zorn, R. Nagpal, and K. Pattabiraman. Detecting and tolerating asymmetric races. In PPoPP, 2009.
    [31]
    E. Rescorla. Security holes ... who cares? In USENIX Security Conference, 2003.
    [32]
    S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson. Eraser: A dynamic data race detector for multithreaded programs. ACM Transactions on Computer Systems, 15, 1997.
    [33]
    S. Sidiroglou, S. Ioannidis, and A. D. Keromytis. Band-aid patching. In HotDep, 2007.
    [34]
    A. Solar-Lezama, C. G. Jones, and R. Bodik. Sketching concurrent data structures. In PLDI, 2008.
    [35]
    C. Tian, V. Nagarajan, R. Gupta, and S. Tallam. Dynamic recognition of synchronization operations for improved data race detection. In ISSTA, 2008.
    [36]
    G. Upadhyaya, S. P. Midkiff, and V. S. Pai. Automatic atomic region identification in shared memory spmd programs. In OOPSLA, 2010.
    [37]
    M. Vaziri, F. Tip, and J. Dolby. Associating synchronization constraints with data in an object-oriented language. In POPL, 2006.
    [38]
    M. T. Vechev, E. Yahav, and G. Yorsh. Abstraction-guided synthesis of synchronization. In POPL, 2010.
    [39]
    D. Weeratunge, X. Zhang, and S. Jagannathan. Analyzing multicore dumps to facilitate concurrency bug reproduction. In ASPLOS, 2010.
    [40]
    J. Wu, H. Cui, and J. Yang. Bypassing races in live applications with execution filters. In OSDI, 2010.
    [41]
    W. Xiong, S. Park, J. Zhang, Y. Zhou, and Z. Ma. Ad hoc synchronization considered harmful. In OSDI, 2010.
    [42]
    C. Zamfir and G. Candea. Execution synthesis: A technique for automated software debugging. In EuroSys, 2010.

    Cited By

    View all
    • (2023)Hippodrome: Data Race Repair Using Static Analysis SummariesACM Transactions on Software Engineering and Methodology10.1145/354694232:2(1-33)Online publication date: 31-Mar-2023
    • (2023)GPURepair: Automated Repair of GPU Kernels (Extended Version)Sādhanā10.1007/s12046-023-02291-049:1Online publication date: 22-Dec-2023
    • (2022)ICEBAR: Feedback-Driven Iterative Repair of Alloy SpecificationsProceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering10.1145/3551349.3556944(1-13)Online publication date: 10-Oct-2022
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 46, Issue 6
    PLDI '11
    June 2011
    652 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1993316
    Issue’s Table of Contents
    • cover image ACM Conferences
      PLDI '11: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation
      June 2011
      668 pages
      ISBN:9781450306638
      DOI:10.1145/1993498
      • General Chair:
      • Mary Hall,
      • Program Chair:
      • David Padua
    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: 04 June 2011
    Published in SIGPLAN Volume 46, Issue 6

    Check for updates

    Author Tags

    1. atomicity violations
    2. automated debugging
    3. concurrency
    4. critical regions
    5. deadlock
    6. mutex locks
    7. mutual exclusion
    8. patching
    9. static analysis

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)36
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 10 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Hippodrome: Data Race Repair Using Static Analysis SummariesACM Transactions on Software Engineering and Methodology10.1145/354694232:2(1-33)Online publication date: 31-Mar-2023
    • (2023)GPURepair: Automated Repair of GPU Kernels (Extended Version)Sādhanā10.1007/s12046-023-02291-049:1Online publication date: 22-Dec-2023
    • (2022)ICEBAR: Feedback-Driven Iterative Repair of Alloy SpecificationsProceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering10.1145/3551349.3556944(1-13)Online publication date: 10-Oct-2022
    • (2022)ATR: template-based repair for Alloy specificationsProceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3533767.3534369(666-677)Online publication date: 18-Jul-2022
    • (2022)Automatic Detection, Validation, and Repair of Race Conditions in Interrupt-Driven Embedded SoftwareIEEE Transactions on Software Engineering10.1109/TSE.2020.298917148:1(346-363)Online publication date: 1-Jan-2022
    • (2022)SituRepair: Incorporating machine-learning fault class prediction to inform situational multiple fault automatic program repairInternational Journal of Critical Infrastructure Protection10.1016/j.ijcip.2022.10052737(100527)Online publication date: Jul-2022
    • (2021)GPURepair: Automated Repair of GPU KernelsVerification, Model Checking, and Abstract Interpretation10.1007/978-3-030-67067-2_18(401-414)Online publication date: 12-Jan-2021
    • (2020)Atomicity Violation in Multithreaded Applications and Its Detection in Static Code Analysis ProcessApplied Sciences10.3390/app1022800510:22(8005)Online publication date: 12-Nov-2020
    • (2020)Deadlocks Detection in Multithreaded Applications Based on Source Code AnalysisApplied Sciences10.3390/app1002053210:2(532)Online publication date: 10-Jan-2020
    • (2020)IFIX: Fixing Concurrency Bugs While They Are Introduced2020 25th International Conference on Engineering of Complex Computer Systems (ICECCS)10.1109/ICECCS51672.2020.00025(155-164)Online publication date: Oct-2020
    • 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