PredRacer: Predictively Detecting Data Races in Android Applications

Xin Guo,Xiaofang Qi,Yanhui Li,Chao Wu
DOI: https://doi.org/10.1109/saner60148.2024.00031
2024-01-01
Abstract:Android platform offers a hybrid concurrency model encompassing multi-threading and asynchronous messaging for concurrent programming. The model is powerful but complex, making it difficult for developers to analyze concurrent behaviors. Data race, a prevalent concurrency defect in real-world Android applications, often results in abnormal executions of mobile applications, even crashes. Despite quite a few studies on detecting data races, it still suffers from high false positives with static analysis techniques and high false negatives with dynamic analysis techniques. To address this issue, this paper presents a predictive approach, PredRacer, for detecting data races in Android applications. It first captures an execution trace of an Android application, and then reorders the events within the trace based on partial orders. Finally, it checks the feasibility of the generated event sequence, which contains a potential data race. PredRacer increases the search scope and reduces false negatives while mitigating false positives by incorporating the happen-before relations specific to the Android concurrency model. The effectiveness of PredRacer is evaluated using the BenchERoid data set. Experimental results demonstrate that PredRacer achieves high precision, recall, and F1 score, outperforming the state-of-the-art techniques. A collection of 20 open-source Android applications is further utilized to assess the effectiveness of PredRacer, and an evaluation of 300 wild apps is conducted to assess its efficiency and scalability.
What problem does this paper attempt to address?