Replaying Harmful Data Races in Android Apps

Android system holds a dominant role in the world market of mobile systems and supports rich types of events. However, most events occur unpredictably, which may lead to concurrency bugs and cause serious damages. Although many concurrency bugs have been detected in Android system, they often cannot be replayed and are hard to be fixed due to the framework-based and event-driven nature of Android system. In this paper, we present a tool named DRUN to replay harmful data races for Android apps. DRUN is composed of two parts: one is the Candidate Set (CS) generator for data races and the Listener Callback Control-flow Graph (LCCG) constructor, the other is the test script generator, so as to replay data races by executing these scripts. We tested DRUN on 15 popular Android apps. The results showed significant improvement on the coverage rate and reduction in False Positives when replaying harmful data races.

[1]  Raja Das,et al.  Effective Static Analysis to Find Concurrency Bugs in Java , 2010, 2010 10th IEEE Working Conference on Source Code Analysis and Manipulation.

[2]  Alexander Aiken,et al.  Effective static race detection for Java , 2006, PLDI '06.

[3]  Jong-Deok Choi,et al.  Hybrid dynamic data race detection , 2003, PPoPP '03.

[4]  Jeff Huang,et al.  Persuasive prediction of concurrency access anomalies , 2011, ISSTA '11.

[5]  Dan Grossman,et al.  IFRit: interference-free regions for dynamic data-race detection , 2012, OOPSLA '12.

[6]  Xiangyu Zhang,et al.  Static detection of resource contention problems in server-side scripts , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[7]  Alexander Aiken,et al.  Conditional must not aliasing for static race detection , 2007, POPL '07.

[8]  Satish Narayanasamy,et al.  Race detection for event-driven mobile applications , 2014, PLDI.

[9]  Xiangyu Zhang,et al.  Statically locating web application bugs caused by asynchronous calls , 2011, WWW.

[10]  Sharad Malik,et al.  Predictive analysis for detecting serializability violations through Trace Segmentation , 2011, Ninth ACM/IEEE International Conference on Formal Methods and Models for Codesign (MEMPCODE2011).

[11]  Sriram Sankaranarayanan,et al.  Fast and Accurate Static Data-Race Detection for Concurrent Programs , 2007, CAV.

[12]  Yun Zhang,et al.  Static data race detection for concurrent programs with asynchronous calls , 2009, ESEC/FSE '09.

[13]  Manu Sridharan,et al.  Effective race detection for event-driven programs , 2013, OOPSLA.

[14]  Rupak Majumdar,et al.  Race detection for Android applications , 2014, PLDI.

[15]  David Gay,et al.  Effective static deadlock detection , 2009, 2009 IEEE 31st International Conference on Software Engineering.

[16]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[17]  Chao Wang,et al.  ConcBugAssist: constraint solving for diagnosis and repair of concurrency bugs , 2015, ISSTA.

[18]  Serdar Tasiran,et al.  Goldilocks: a race and transaction-aware java runtime , 2007, PLDI '07.

[19]  Josep Torrellas,et al.  Dynamically detecting and tolerating IF-Condition Data Races , 2014, 2014 IEEE 20th International Symposium on High Performance Computer Architecture (HPCA).

[20]  Martin T. Vechev,et al.  Scalable race detection for Android applications , 2015, OOPSLA.

[21]  Stephen N. Freund,et al.  FastTrack: efficient and precise dynamic race detection , 2009, PLDI '09.

[22]  Michael D. Bond,et al.  PACER: proportional detection of data races , 2010, PLDI '10.

[23]  Stephen N. Freund,et al.  Detecting race conditions in large programs , 2001, PASTE '01.

[24]  Chao Wang,et al.  Universal Causality Graphs: A Precise Happens-Before Model for Detecting Bugs in Concurrent Programs , 2010, CAV.

[25]  Todd D. Millstein,et al.  RERAN: Timing- and touch-sensitive record and replay for Android , 2013, 2013 35th International Conference on Software Engineering (ICSE).

[26]  George Candea,et al.  Automated Classification of Data Races Under Both Strong and Weak Memory Models , 2015, TOPL.

[27]  Sebastian Burckhardt,et al.  Effective Data-Race Detection for the Kernel , 2010, OSDI.

[28]  Jeff Huang,et al.  Scaling predictive analysis of concurrent programs by removing trace redundancy , 2013, TSEM.

[29]  Manu Sridharan,et al.  Race detection for web applications , 2012, PLDI.