[go: up one dir, main page]

skip to main content
10.1145/3533767.3534412acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article

Precise and efficient atomicity violation detection for interrupt-driven programs via staged path pruning

Published: 18 July 2022 Publication History

Abstract

Interrupt-driven programs are widely used in aerospace and other safety-critical areas. However, uncertain interleaving execution of interrupts may cause concurrency bugs, which could result in serious safety problems. Most of the previous researches tackling the detection of interrupt concurrency bugs focus on data races, that are usually benign as shown in empirical studies. Some studies focus on pattern-based atomicity violations that are most likely harmful. However, they cannot achieve simultaneous high precision and scalability. This paper presents intAtom, a precise and efficient static detection technique for interrupt atomicity violations, described by access interleaving pattern. The key point is that it eliminates false violations by staged path pruning with constraint solving. It first identifies all the violation candidates using data flow analysis and access interleaving pattern matching. intAtom then analyzes the path feasibility between two consecutive accesses in preempted task/interrupt, in order to recognize the atomicity intention of developers, with the help of which it filters out some candidates. Finally, it performs a modular path pruning by constructing symbolic summary and representative preemption points selection to eliminate the infeasible path in concurrent context efficiently. All the path feasibility checking processes are based on sparse value-flow analysis, which makes intAtom scalable. intAtom is evaluated on a benchmark and 6 real-world aerospace embedded programs. The experimental results show that intAtom reduces the false positive by 72% and improves the detection speed by 3 times, compared to the state-of-the-art methods. Furthermore, it can finish analyzing the real-world aerospace embedded software very fast with an average FP rate of 19.6%, while finding 19 bugs that were confirmed by developers.

References

[1]
2019. Racebench website. https://github.com/chenruibuaa/racebench.
[2]
2021. DG website. https://github.com/mchalupa/dg.
[3]
Pavol Bielik, Veselin Raychev, and Martin Vechev. 2015. Scalable race detection for android applications. ACM SIGPLAN Notices, 50, 10 (2015), 332–348. https://doi.org/10.1145/2814270.2814303
[4]
Eric Bodden. 2012. Inter-procedural data-flow analysis with ifds/ide and soot. In Proceedings of the ACM SIGPLAN International Workshop on State of the Art in Java Program analysis. 3–8. https://doi.org/10.1145/2259051.2259052
[5]
Xiaoning Chang, Wensheng Dou, Yu Gao, Jie Wang, Jun Wei, and Tao Huang. 2019. Detecting atomicity violations for event-driven Node. js applications. In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE). 631–642. https://doi.org/10.1109/icse.2019.00073
[6]
Qichang Chen, Liqiang Wang, Zijiang Yang, and Scott D Stoller. 2009. HAVE: Detecting atomicity violations via integrated dynamic and static analysis. In International Conference on Fundamental Approaches to Software Engineering. 425–439. https://doi.org/10.1007/978-3-642-00593-0_30
[7]
Rui Chen, Xiangying Guo, Yonghao Duan, Bin Gu, and Mengfei Yang. 2011. Static data race detection for interrupt-driven embedded software. In 2011 Fifth International Conference on Secure Software Integration and Reliability Improvement-Companion. 47–52. https://doi.org/10.1109/ssiri-c.2011.18
[8]
Rui Chen, Mengfei Yang, and Xiangying Guo. 2016. Interrupt data race detection based on shared variable access order pattern. Ruan Jian Xue Bao/Journal of Software, 547–561. https://doi.org/10.13328/j.cnki.jos.004980
[9]
Lee Chew and David Lie. 2010. Kivati: fast detection and prevention of atomicity violations. In Proceedings of the 5th European conference on Computer systems. 307–320. https://doi.org/10.1145/1755913.1755945
[10]
Nikita Chopra, Rekha Pai, and Deepak D’Souza. 2019. Data races and static analysis for interrupt-driven kernels. In European Symposium on Programming. 697–723. https://doi.org/10.1007/978-3-030-17184-1_25
[11]
Leonardo De Moura and Nikolaj Bjørner. 2008. Z3: An efficient SMT solver. In International conference on Tools and Algorithms for the Construction and Analysis of Systems. 337–340. https://doi.org/10.1007/978-3-540-78800-3_24
[12]
Haining Feng, Liangze Yin, Wenfeng Lin, Xudong Zhao, and Wei Dong. 2020. Rchecker: A CBMC-based Data Race Detector for Interrupt-driven Programs. In 2020 IEEE 20th International Conference on Software Quality, Reliability and Security Companion (QRS-C). 465–471. https://doi.org/10.1109/qrs-c51114.2020.00084
[13]
Cormac Flanagan and Stephen N Freund. 2004. Atomizer: a dynamic atomicity checker for multithreaded programs. ACM SIGPLAN Notices, 39, 1 (2004), 256–267. https://doi.org/10.1109/ipdps.2004.1303345
[14]
Cormac Flanagan, Stephen N Freund, and Jaeheon Yi. 2008. Velodrome: a sound and complete dynamic atomicity checker for multithreaded programs. ACM SIGPLAN Notices, 43, 6 (2008), 293–303. https://doi.org/10.1145/1379022.1375618
[15]
Shin Hong, Yongbae Park, and Moonzoo Kim. 2014. Detecting concurrency errors in client-side java script web applications. In 2014 IEEE Seventh International Conference on Software Testing, Verification and Validation. 61–70. https://doi.org/10.1109/icst.2014.17
[16]
Chun-Hung Hsiao, Jie Yu, Satish Narayanasamy, Ziyun Kong, Cristiano L Pereira, Gilles A Pokam, Peter M Chen, and Jason Flinn. 2014. Race detection for event-driven mobile applications. ACM SIGPLAN Notices, 49, 6 (2014), 326–336. https://doi.org/10.1145/2594291.2594330
[17]
Yongjian Hu, Iulian Neamtiu, and Arash Alavi. 2016. Automatically verifying and reproducing event-based races in android apps. In Proceedings of the 25th International Symposium on Software Testing and Analysis. 377–388. https://doi.org/10.1145/2931037.2931069
[18]
Chris Lattner. 2008. LLVM and Clang: Next generation compiler technology. In The BSD conference. 5.
[19]
Zdeněk Letko, Tomáš Vojnar, and Bohuslav Křena. 2008. AtomRace: data race and atomicity violation detector and healer. In Proceedings of the 6th workshop on parallel and distributed systems: testing, analysis, and debugging. 1–10.
[20]
Peng Liu and Charles Zhang. 2012. Axis: Automatically fixing atomicity violations through solving control constraints. In 2012 34th International Conference on Software Engineering (ICSE). 299–309. https://doi.org/10.1109/icse.2012.6227184
[21]
Shan Lu, Soyeon Park, and Yuanyuan Zhou. 2011. Finding atomicity-violation bugs through unserializable interleaving testing. IEEE Transactions on Software Engineering, 38, 4 (2011), 844–860. https://doi.org/10.1109/tse.2011.35
[22]
Shan Lu, Joseph Tucek, Feng Qin, and Yuanyuan Zhou. 2006. AVIO: detecting atomicity violations via access interleaving invariants. ACM SIGOPS Operating Systems Review, 40, 5 (2006), 37–48. https://doi.org/10.1109/mm.2007.5
[23]
Brandon Lucia, Joseph Devietti, Karin Strauss, and Luis Ceze. 2008. Atom-aid: Detecting and surviving atomicity violations. In 2008 International Symposium on Computer Architecture. 277–288. https://doi.org/10.1109/isca.2008.4
[24]
Pallavi Maiya, Aditya Kanade, and Rupak Majumdar. 2014. Race detection for android applications. ACM SIGPLAN Notices, 49, 6 (2014), 316–325. https://doi.org/10.1145/2666356.2594311
[25]
Minxue Pan, Shouyu Chen, Yu Pei, Tian Zhang, and Xuandong Li. 2019. Easy modelling and verification of unpredictable and preemptive interrupt-driven systems. In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE). 212–222. https://doi.org/10.1109/icse.2019.00037
[26]
Sangmin Park. 2013. Fault comprehension for concurrent programs. In 2013 35th International Conference on Software Engineering (ICSE). 1444–1446. https://doi.org/10.1109/icse.2013.6606739
[27]
Sangmin Park, Mary Jean Harrold, and Richard Vuduc. 2013. Griffin: grouping suspicious memory-access patterns to improve understanding of concurrency bugs. In Proceedings of the 2013 International Symposium on Software Testing and Analysis. 134–144. https://doi.org/10.1145/2483760.2483792
[28]
Sangmin Park, Richard Vuduc, and Mary Jean Harrold. 2015. unicorn: a unified approach for localizing non-deadlock concurrency bugs. Software Testing, Verification and Reliability, 25, 3 (2015), 167–190. https://doi.org/10.1002/stvr.1523
[29]
Sangmin Park, Richard W Vuduc, and Mary Jean Harrold. 2010. Falcon: fault localization in concurrent programs. In Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering-Volume 1. 245–254. https://doi.org/10.1145/1806799.1806838
[30]
Veselin Raychev, Martin Vechev, and Manu Sridharan. 2013. Effective race detection for event-driven programs. In Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications. 151–166. https://doi.org/10.1145/2544173.2509538
[31]
Niloofar Razavi, Azadeh Farzan, and Sheila A McIlraith. 2014. Generating effective tests for concurrent programs via AI automated planning techniques. International Journal on Software Tools for Technology Transfer, 16, 1 (2014), 49–65. https://doi.org/10.1007/s10009-013-0277-y
[32]
John Regehr. 2005. Random testing of interrupt-driven software. In Proceedings of the 5th ACM International Conference on Embedded software. 290–298. https://doi.org/10.1145/1086228.1086282
[33]
Caitlin Sadowski, Stephen N Freund, and Cormac Flanagan. 2009. SingleTrack: A dynamic determinism checker for multithreaded programs. In European Symposium on Programming. 394–409. https://doi.org/10.1007/978-3-642-00590-9_28
[34]
Qingkai Shi, Xiao Xiao, Rongxin Wu, Jinguo Zhou, Gang Fan, and Charles Zhang. 2018. Pinpoint: Fast and precise sparse value flow analysis for million lines of code. In Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation. 693–706. https://doi.org/10.1145/3192366.3192418
[35]
Yao Shi, Soyeon Park, Zuoning Yin, Shan Lu, Yuanyuan Zhou, Wenguang Chen, and Weimin Zheng. 2010. Do I use the wrong definition? DefUse: Definition-use invariants for detecting concurrency and sequential bugs. In Proceedings of the ACM international conference on Object oriented programming systems languages and applications. 160–174. https://doi.org/10.1145/1932682.1869474
[36]
Gregor Snelting, Torsten Robschink, and Jens Krinke. 2006. Efficient path conditions in dependence graphs for software safety analysis. ACM Transactions on Software Engineering and Methodology (TOSEM), 15, 4 (2006), 410–457. https://doi.org/10.1145/1178625.1178628
[37]
China Academy of Space Technology Software Product Assurance Center. 2015. Analysis Report on Software Quality Problems of China Academy of Space Technology.
[38]
Francesco Sorrentino, Azadeh Farzan, and P Madhusudan. 2010. PENELOPE: weaving threads to expose atomicity violations. In Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineering. 37–46. https://doi.org/10.1145/1882291.1882300
[39]
Yuxia Sun, Shing-Chi Cheung, Song Guo, and Ming Cheng. 2019. Disclosing and Locating Concurrency Bugs of Interrupt-Driven IoT Programs. IEEE Internet of Things Journal, 6, 5 (2019), 8945–8957. https://doi.org/10.1109/jiot.2019.2925291
[40]
Rishi Tulsyan, Rekha Pai, and Deepak D’Souza. 2020. Static Race Detection for RTOS Applications. arXiv preprint arXiv:2010.02642, https://doi.org/10.48550/arXiv.2010.02642
[41]
Mandana Vaziri, Frank Tip, and Julian Dolby. 2006. Associating synchronization constraints with data in an object-oriented language. ACM Sigplan Notices, 41, 1 (2006), 334–345. https://doi.org/10.1145/1111320.1111067
[42]
Chao Wang, Rhishikesh Limaye, Malay Ganai, and Aarti Gupta. 2010. Trace-based symbolic analysis for atomicity violations. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems. 328–342. https://doi.org/10.1007/978-3-642-12002-2_27
[43]
Liqiang Wang and Scott D Stoller. 2006. Accurate and efficient runtime detection of atomicity errors in concurrent programs. In Proceedings of the eleventh ACM SIGPLAN symposium on Principles and practice of parallel programming. 137–146. https://doi.org/10.1145/1122971.1122993
[44]
Liqiang Wang and Scott D Stoller. 2006. Runtime analysis of atomicity for multithreaded programs. IEEE Transactions on Software Engineering, 32, 2 (2006), 93–110. https://doi.org/10.1109/tse.2006.1599419
[45]
Pengfei Wang, Jens Krinke, Xu Zhou, and Kai Lu. 2019. AVPredictor: Comprehensive prediction and detection of atomicity violations. Concurrency and Computation: Practice and Experience, 31, 15 (2019), e5160. https://doi.org/10.1002/cpe.5160
[46]
Yu Wang, Junjing Shi, Linzhang Wang, Jianhua Zhao, and Xuandong Li. 2015. Detecting data races in interrupt-driven programs based on static analysis and dynamic simulation. In Proceedings of the 7th Asia-Pacific Symposium on Internetware. 199–202. https://doi.org/10.1145/2875913.2875943
[47]
Yu Wang, Linzhang Wang, Tingting Yu, Jianhua Zhao, and Xuandong Li. 2017. Automatic detection and validation of race conditions in interrupt-driven embedded software. In Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis. 113–124. https://doi.org/10.1145/3092703.3092724
[48]
Xueguang Wu, Liqian Chen, Antoine Miné, Wei Dong, and Ji Wang. 2015. Numerical static analysis of interrupt-driven programs via sequentialization. In 2015 International Conference on Embedded Software (EMSOFT). 55–64. https://doi.org/10.1109/emsoft.2015.7318260
[49]
Xueguang Wu, Yanjun Wen, Liqian Chen, Wei Dong, and Ji Wang. 2013. Data race detection for interrupt-driven programs via bounded model checking. In 2013 IEEE Seventh International Conference on Software Security and Reliability Companion. 204–210. https://doi.org/10.1109/sere-c.2013.33
[50]
Tingting Yu, Witawas Srisa-an, and Gregg Rothermel. 2012. SimTester: a controllable and observable testing framework for embedded systems. In Proceedings of the 8th ACM SIGPLAN/SIGOPS conference on Virtual Execution Environments. 51–62. https://doi.org/10.1145/2365864.2151034
[51]
Wei Zhang, Junghee Lim, Ramya Olichandran, Joel Scherpelz, Guoliang Jin, Shan Lu, and Thomas Reps. 2011. ConSeq: detecting concurrency bugs through sequential errors. ACM SIGARCH Computer Architecture News, 39, 1 (2011), 251–264. https://doi.org/10.1145/1961295.1950395
[52]
Wei Zhang, Chong Sun, Junghee Lim, Shan Lu, and Thomas Reps. 2013. Conmem: Detecting crash-triggering concurrency bugs through an effect-oriented approach. ACM Transactions on Software Engineering and Methodology (TOSEM), 22, 2 (2013), 1–33. https://doi.org/10.1145/2430545.2430546

Cited By

View all
  • (2024)When threads meet interruptsProceedings of the 33rd USENIX Conference on Security Symposium10.5555/3698900.3699245(6167-6184)Online publication date: 14-Aug-2024
  • (2024)Static Deadlock Detection for Interrupt-driven Embedded Software2024 International Conference on Cyber-Physical Social Intelligence (ICCSI)10.1109/ICCSI62669.2024.10799242(1-6)Online publication date: 8-Nov-2024
  • (2024)Efficient data race detection for interrupt-driven programs via path feasibility analysisThe Journal of Supercomputing10.1007/s11227-024-06189-480:15(21699-21725)Online publication date: 14-Jun-2024
  • Show More Cited By

Index Terms

  1. Precise and efficient atomicity violation detection for interrupt-driven programs via staged path pruning

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ISSTA 2022: Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis
    July 2022
    808 pages
    ISBN:9781450393799
    DOI:10.1145/3533767
    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].

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 18 July 2022

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. atomicity violation
    2. concurrency bug
    3. embedded software
    4. interrupt-driven programs
    5. static analysis

    Qualifiers

    • Research-article

    Conference

    ISSTA '22
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 58 of 213 submissions, 27%

    Upcoming Conference

    ISSTA '25

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)66
    • Downloads (Last 6 weeks)3
    Reflects downloads up to 20 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)When threads meet interruptsProceedings of the 33rd USENIX Conference on Security Symposium10.5555/3698900.3699245(6167-6184)Online publication date: 14-Aug-2024
    • (2024)Static Deadlock Detection for Interrupt-driven Embedded Software2024 International Conference on Cyber-Physical Social Intelligence (ICCSI)10.1109/ICCSI62669.2024.10799242(1-6)Online publication date: 8-Nov-2024
    • (2024)Efficient data race detection for interrupt-driven programs via path feasibility analysisThe Journal of Supercomputing10.1007/s11227-024-06189-480:15(21699-21725)Online publication date: 14-Jun-2024
    • (2024)Detect atomicity violations in concurrent programs through user assistance and identification of suspicious variable access patternsJournal of Software: Evolution and Process10.1002/smr.272537:1Online publication date: 3-Sep-2024
    • (2023)An Empirical Study on Concurrency Bugs in Interrupt-Driven Embedded SoftwareProceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3597926.3598140(1345-1356)Online publication date: 12-Jul-2023
    • (2023)intCV: Automatically Inferring Correlated Variables in Interrrupt-Driven Program2023 IEEE 23rd International Conference on Software Quality, Reliability, and Security (QRS)10.1109/QRS60937.2023.00061(562-568)Online publication date: 22-Oct-2023

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media