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

ARROW: automated repair of races on client-side web pages

Published: 18 July 2016 Publication History

Abstract

Modern browsers have a highly concurrent page rendering process in order to be more responsive. However, such a concurrent execution model leads to various race issues. In this paper, we present ARROW, a static technique that can automatically, safely, and cost effectively patch certain race issues on client side pages. It works by statically modeling a web page as a causal graph denoting happens-before relations between page elements, according to the rendering process in browsers. Races are detected by identifying inconsistencies between the graph and the dependence relations intended by the developer. Detected races are fixed by leveraging a constraint solver to add a set of edges with the minimum cost to the causal graph so that it is consistent with the intended dependences. The input page is then transformed to respect the repair edges. ARROW has fixed 151 races from 20 real world commercial web sites.

References

[1]
IBM, The T.J. Watson Libraries for Analysis (WALA). http://wala.sourceforge.net/.
[2]
Native JavaScript: sync and async. http://blog.getify.com/native-javascript-sync-async/.
[3]
Quantifier Vs Non-Quantifier. http://stackoverflow. com/questions/10011478/quantifier-vs-non-quantifier.
[4]
race condition for ‘loaded’ callback. https://github.com/mixpanel/mixpanel-js/issues/11.
[5]
Race condition when loading images dynamically. http://web.onassar.com/blog/2013/10/09/.
[6]
Muath Alkhalaf, Abdulbaki Aydin, and Tevfik Bultan. Semantic differential repair for input validation and sanitization. In Proceedings of the 2014 International Symposium on Software Testing and Analysis, ISSTA 2014, pages 225–236, New York, NY, USA, 2014. ACM.
[7]
Leonardo De Moura and Nikolaj Bjørner. Z3: An efficient SMT solver. In Proceedings of the Theory and Practice of Software, 14th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, TACAS ’08/ETAPS ’08, pages 337–340, Berlin, Heidelberg, 2008. Springer-Verlag.
[8]
DongDong Deng, GuoLiang Jin, Marc de Kruijf, Ang Li, Ben Liblit, Shan Lu, ShanXiang Qi, JingLei Ren, Karthikeyan Sankaralingam, LinHai Song, YongWei Wu, MingXing Zhang, Wei Zhang, and WeiMin Zheng. Fixing, preventing, and recovering from concurrency bugs. Science China Information Sciences, 58(5):1–18, 2015.
[9]
Qing Gao, Yingfei Xiong, Yaqing Mi, Lu Zhang, Weikun Yang, Zhaoping Zhou, Bing Xie, and Hong Mei. Safe memory-leak fixing for c programs. In Proceedings of the 37th International Conference on Software Engineering - Volume 1, ICSE ’15, pages 459–470, Piscataway, NJ, USA, 2015. IEEE Press.
[10]
Shin Hong, Yongbae Park, and Moonzoo Kim. Detecting concurrency errors in client-side javascript web applications. In Proceedings of the 2014 IEEE International Conference on Software Testing, Verification, and Validation, ICST ’14, pages 61–70, Washington, DC, USA, 2014. IEEE Computer Society.
[11]
Guoliang Jin, Wei Zhang, Dongdong Deng, Ben Liblit, and Shan Lu. Automated concurrency-bug fixing. In Proceedings of the 10th USENIX Conference on Operating Systems Design and Implementation, OSDI ’12, pages 221–236, Berkeley, CA, USA, 2012. USENIX Association.
[12]
Yalin Ke, Kathryn T. Stolee, Claire Le Goues, and Yuriy Brun. Repairing Programs with Semantic Code Search. In Proceedings of the 30th IEEE/ACM International Conference on Automated Software Engineering (ASE), pages 295–306, Lincoln, NE, USA, November 2015.
[13]
Sepideh Khoshnood, Markus Kusano, and Chao Wang. Concbugassist: Constraint solving for diagnosis and repair of concurrency bugs. In Proceedings of the 2015 International Symposium on Software Testing and Analysis, ISSTA 2015, pages 165–176, New York, NY, USA, 2015. ACM.
[14]
C. Le Goues, ThanhVu Nguyen, S. Forrest, and W. Weimer. Genprog: A generic method for automatic software repair. Software Engineering, IEEE Transactions on, 38(1):54–72, Jan 2012.
[15]
Peng Liu, Omer Tripp, and Charles Zhang. Grail: Context-aware fixing of concurrency bugs. In Proceedings of the 22Nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, FSE 2014, pages 318–329, New York, NY, USA, 2014. ACM.
[16]
Sergey Mechtaev, Jooyong Yi, and Abhik Roychoudhury. Directfix: Looking for simple program repairs. In Proceedings of the 37th International Conference on Software Engineering - Volume 1, ICSE ’15, pages 448–458, Piscataway, NJ, USA, 2015. IEEE Press.
[17]
Hoang Duong Thien Nguyen, Dawei Qi, Abhik Roychoudhury, and Satish Chandra. Semfix: Program repair via semantic analysis. In Proceedings of the 2013 International Conference on Software Engineering, ICSE ’13, pages 772–781, Piscataway, NJ, USA, 2013. IEEE Press.
[18]
Hung Viet Nguyen, Hoan Anh Nguyen, Tung Thanh Nguyen, and T.N. Nguyen. Auto-locating and fix-propagating for html validation errors to php server-side code. In Proceedings of the 26th IEEE/ACM International Conference on Automated Software Engineering, ASE ’11, pages 13–22, 2011.
[19]
Boris Petrov, Martin Vechev, Manu Sridharan, and Julian Dolby. Race detection for web applications. In Proceedings of the 33rd ACM SIGPLAN conference on Programming Language Design and Implementation, PLDI ’12, pages 251–262, New York, NY, USA, 2012. ACM.
[20]
Sreeram Ramachandran. Web metrics: Size and number of resources. https: //developers.google.com/speed/articles/web-metrics. Last updated: 26 May 2010.
[21]
Veselin Raychev, Martin Vechev, and Manu Sridharan. Effective race detection for event-driven programs. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA ’13, pages 151–166, New York, NY, USA, 2013. ACM.
[22]
Veselin Raychev, Martin Vechev, and Eran Yahav. Automatic synthesis of deterministic concurrency. In Francesco Logozzo and Manuel Fähndrich, editors, Static Analysis, volume 7935 of Lecture Notes in Computer Science, pages 283–303. Springer Berlin Heidelberg, 2013.
[23]
Hesam Samimi, Max Schäfer, Shay Artzi, Todd Millstein, Frank Tip, and Laurie Hendren. Automated repair of html generation errors in php applications using string constraint solving. In Proceedings of the 2012 International Conference on Software Engineering, ICSE ’12, pages 277–287, Piscataway, NJ, USA, 2012. IEEE Press.
[24]
Marija Selakovic and Michael Pradel. Automatically fixing real-world javascript performance bugs. In Proceedings of the 37th International Conference on Software Engineering - Volume 2, ICSE ’15, pages 811–812, Piscataway, NJ, USA, 2015. IEEE Press.
[25]
Koushik Sen, Swaroop Kalasapur, Tasneem Brutch, and Simon Gibbs. Jalangi: A selective record-replay and dynamic analysis framework for javascript. In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2013, pages 488–498, New York, NY, USA, 2013. ACM.
[26]
Koushik Sen, George Necula, Liang Gong, and Wontae Choi. Multise: Multi-path symbolic execution using value summaries. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2015, pages 842–853, New York, NY, USA, 2015. ACM.
[27]
Lu Zhang and Chao Wang. Runtime prevention of concurrency related type-state violations in multithreaded applications. In Proceedings of the 2014 International Symposium on Software Testing and Analysis, ISSTA 2014, pages 1–12, New York, NY, USA, 2014. ACM.

Cited By

View all
  • (2023)NodeRT: Detecting Races in Node.js Applications PracticallyProceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3597926.3598139(1332-1344)Online publication date: 12-Jul-2023
  • (2023)Business-layer client-side racer: dynamic security testing of the web application against client-side race condition in the business layerInternational Journal of Information Security10.1007/s10207-023-00671-522:4(1029-1054)Online publication date: 20-Mar-2023
  • (2022)Watch Out for Race Condition Attacks When Using Android External StorageProceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security10.1145/3548606.3560666(891-904)Online publication date: 7-Nov-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ISSTA 2016: Proceedings of the 25th International Symposium on Software Testing and Analysis
July 2016
452 pages
ISBN:9781450343909
DOI:10.1145/2931037
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

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 18 July 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Automatic repair
  2. constraint solving
  3. race condition

Qualifiers

  • Research-article

Conference

ISSTA '16
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)8
  • Downloads (Last 6 weeks)2
Reflects downloads up to 30 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2023)NodeRT: Detecting Races in Node.js Applications PracticallyProceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3597926.3598139(1332-1344)Online publication date: 12-Jul-2023
  • (2023)Business-layer client-side racer: dynamic security testing of the web application against client-side race condition in the business layerInternational Journal of Information Security10.1007/s10207-023-00671-522:4(1029-1054)Online publication date: 20-Mar-2023
  • (2022)Watch Out for Race Condition Attacks When Using Android External StorageProceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security10.1145/3548606.3560666(891-904)Online publication date: 7-Nov-2022
  • (2022)Semantic web RacerExpert Systems with Applications: An International Journal10.1016/j.eswa.2022.116569195:COnline publication date: 1-Jun-2022
  • (2021)Race Detection for Event-Driven Node.js Applications2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE51524.2021.9678814(480-491)Online publication date: Nov-2021
  • (2019)Detecting atomicity violations for event-driven Node.js applicationsProceedings of the 41st International Conference on Software Engineering10.1109/ICSE.2019.00073(631-642)Online publication date: 25-May-2019
  • (2018)Practical AJAX race detection for JavaScript web applicationsProceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3236024.3236038(38-48)Online publication date: 26-Oct-2018
  • (2017)Characterizing and taming non-deterministic bugs in JavaScript applicationsProceedings of the 32nd IEEE/ACM International Conference on Automated Software Engineering10.5555/3155562.3155696(1006-1009)Online publication date: 30-Oct-2017
  • (2017)A comprehensive study on real world concurrency bugs in Node.jsProceedings of the 32nd IEEE/ACM International Conference on Automated Software Engineering10.5555/3155562.3155628(520-531)Online publication date: 30-Oct-2017
  • (2017)Practical initialization race detection for JavaScript web applicationsProceedings of the ACM on Programming Languages10.1145/31338901:OOPSLA(1-22)Online publication date: 12-Oct-2017
  • Show More Cited By

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