CLAP: Recording Local Executions to Reproduce Concurrency Failures

被引:71
作者
Huang, Jeff [1 ]
Zhang, Charles [1 ]
Dolby, Julian
机构
[1] Hong Kong Univ Sci & Technol, Hong Kong, Hong Kong, Peoples R China
关键词
Algorithms; Design; Performance; Theory; Concurrency; Bug Reproduction; Local Execution; Constraint Solving;
D O I
10.1145/2499370.2462167
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present CLAP, a new technique to reproduce concurrency bugs. CLAP has two key steps. First, it logs thread local execution paths at runtime. Second, offline, it computes memory dependencies that accord with the logged execution and are able to reproduce the observed bug. The second step works by combining constraints from the thread paths and constraints based on a memory model, and computing an execution with a constraint solver. CLAP has four major advantages. First, logging purely local execution of each thread is substantially cheaper than logging memory interactions, which enables CLAP to be efficient compared to previous approaches. Second, our logging does not require any synchronization and hence with no added memory barriers or fences; this minimizes perturbation and missed bugs due to extra synchronizations foreclosing certain racy behaviors. Third, since it uses no synchronization, we extend CLAP to work on a range of relaxed memory models, such as TSO and PSO, in addition to sequential consistency. Fourth, CLAP can compute a much simpler execution than the original one, that reveals the bug with minimal thread context switches. To mitigate the scalability issues, we also present an approach to parallelize constraint solving, which theoretically scales our technique to programs with arbitrary execution length. Experimental results on a variety of multithreaded benchmarks and real world concurrent applications validate these advantages by showing that our technique is effective in reproducing concurrency bugs even under relaxed memory models; furthermore, it is significantly more efficient than a state-of-the-art technique that records shared memory dependencies, reducing execution time overhead by 45% and log size by 88% on average.
引用
收藏
页码:141 / 151
页数:11
相关论文
共 43 条
[1]  
Altekar G., 2009, SOSP
[2]  
[Anonymous], 1994, SPARC ARCH MAN V9
[3]  
[Anonymous], 2008, TACAS
[4]  
[Anonymous], 2006, Technical Report
[5]  
[Anonymous], 2008, OSDI 2008
[6]  
Ball T., 1996, MICRO
[7]  
Cadar Cristian, 2008, P OP SYST DES IMPL O, P209
[8]  
Cheung Alvin, 2011, ESEC FSE
[9]  
Flanagan Cormac., 2010, PLDI
[10]  
Ganesh V., 2007, CAV