CLAP: recording local executions to reproduce concurrency failures

Jeff Huang, Charles Zhang, Julian T Dolby
{"title":"CLAP: recording local executions to reproduce concurrency failures","authors":"Jeff Huang, Charles Zhang, Julian T Dolby","doi":"10.1145/2491956.2462167","DOIUrl":null,"url":null,"abstract":"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.","PeriodicalId":224397,"journal":{"name":"Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation","volume":"21 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2013-06-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"129","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2491956.2462167","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 129

Abstract

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.
CLAP:记录本地执行以重现并发失败
我们介绍了CLAP,一种再现并发性错误的新技术。CLAP有两个关键步骤。首先,它在运行时记录线程本地执行路径。其次,在脱机状态下,它计算与记录的执行一致的内存依赖关系,并能够重现观察到的错误。第二步的工作原理是结合线程路径的约束和基于内存模型的约束,并使用约束求解器计算执行。CLAP有四大优势。首先,与记录内存交互相比,记录每个线程的纯本地执行要便宜得多,这使得CLAP比以前的方法更高效。其次,我们的日志记录不需要任何同步,因此不需要添加内存屏障或栅栏;这最大限度地减少了干扰和遗漏的bug,因为额外的同步阻止了某些不合理的行为。第三,由于它不使用同步,除了顺序一致性之外,我们还将CLAP扩展到一系列宽松内存模型上,例如TSO和PSO。第四,CLAP可以计算一个比原始执行简单得多的执行,这揭示了线程上下文切换最少的错误。为了减轻可伸缩性问题,我们还提出了一种并行化约束求解的方法,理论上可以将我们的技术扩展到具有任意执行长度的程序。在各种多线程基准测试和现实世界的并发应用程序上的实验结果表明,即使在宽松的内存模型下,我们的技术也能有效地再现并发错误,从而验证了这些优势;此外,它比记录共享内存依赖项的最先进技术效率高得多,平均减少了45%的执行时间开销和88%的日志大小。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书