通过测试和分类确定数据竞争

Marc Hartung, F. Schintke, T. Schütt
{"title":"通过测试和分类确定数据竞争","authors":"Marc Hartung, F. Schintke, T. Schütt","doi":"10.1109/ISSREW.2019.00100","DOIUrl":null,"url":null,"abstract":"Data races, i.e. the uncoordinated read/write access of threads to a shared variable resulting in unexpected program behaviour, in parallel shared memory programs occur highly dependent on the timing and scheduling of threads during execution. This makes data races hard to detect manually and automatically. Corresponding tools typically suspect too many code locations to cause data races and miss critical ones as the observed execution and timing did not raise them. We present methods and a tool chain for C/C++ codes with POSIX threads to detect data races and verify their harmfulness. We use automatic instrumentation and repeated test-case execution using a user-space thread scheduler overriding the kernel-space scheduler to intentionally generate specific thread interleavings. As the thread scheduling becomes deterministic and independent from the system in use, targeted testing of thread schedules can reveal and verify otherwise hard to find data races. For each data race we classify its harmfulness based on well-defined attributes and can in most cases identify and report its root cause, i.e. the data race which, when fixed, protects the program from crashing. This and a low false positive rate in the reports greatly reduces the overhead in fixing data races for developers.","PeriodicalId":166239,"journal":{"name":"2019 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW)","volume":"42 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Pinpoint Data Races via Testing and Classification\",\"authors\":\"Marc Hartung, F. Schintke, T. Schütt\",\"doi\":\"10.1109/ISSREW.2019.00100\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Data races, i.e. the uncoordinated read/write access of threads to a shared variable resulting in unexpected program behaviour, in parallel shared memory programs occur highly dependent on the timing and scheduling of threads during execution. This makes data races hard to detect manually and automatically. Corresponding tools typically suspect too many code locations to cause data races and miss critical ones as the observed execution and timing did not raise them. We present methods and a tool chain for C/C++ codes with POSIX threads to detect data races and verify their harmfulness. We use automatic instrumentation and repeated test-case execution using a user-space thread scheduler overriding the kernel-space scheduler to intentionally generate specific thread interleavings. As the thread scheduling becomes deterministic and independent from the system in use, targeted testing of thread schedules can reveal and verify otherwise hard to find data races. For each data race we classify its harmfulness based on well-defined attributes and can in most cases identify and report its root cause, i.e. the data race which, when fixed, protects the program from crashing. This and a low false positive rate in the reports greatly reduces the overhead in fixing data races for developers.\",\"PeriodicalId\":166239,\"journal\":{\"name\":\"2019 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW)\",\"volume\":\"42 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2019-10-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2019 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ISSREW.2019.00100\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2019 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISSREW.2019.00100","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

摘要

在并行共享内存程序中,数据竞争,即线程对共享变量的不协调的读/写访问导致意外的程序行为,高度依赖于线程在执行期间的时间和调度。这使得数据竞争难以手动和自动检测。相应的工具通常会怀疑太多的代码位置,从而导致数据竞争,并且会错过关键的位置,因为观察到的执行和计时并没有引发数据竞争。我们提出了带有POSIX线程的C/ c++代码的方法和工具链来检测数据争用并验证其危害性。我们使用自动插装和重复的测试用例执行,使用覆盖内核空间调度器的用户空间线程调度器有意生成特定的线程交织。随着线程调度变得确定且独立于所使用的系统,线程调度的目标测试可以揭示和验证数据竞争,否则很难发现数据竞争。对于每个数据竞争,我们根据定义良好的属性对其危害进行分类,并且在大多数情况下可以识别和报告其根本原因,即数据竞争,当修复时,可以保护程序免于崩溃。这一点和报告中的低误报率大大减少了开发人员修复数据竞争的开销。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Pinpoint Data Races via Testing and Classification
Data races, i.e. the uncoordinated read/write access of threads to a shared variable resulting in unexpected program behaviour, in parallel shared memory programs occur highly dependent on the timing and scheduling of threads during execution. This makes data races hard to detect manually and automatically. Corresponding tools typically suspect too many code locations to cause data races and miss critical ones as the observed execution and timing did not raise them. We present methods and a tool chain for C/C++ codes with POSIX threads to detect data races and verify their harmfulness. We use automatic instrumentation and repeated test-case execution using a user-space thread scheduler overriding the kernel-space scheduler to intentionally generate specific thread interleavings. As the thread scheduling becomes deterministic and independent from the system in use, targeted testing of thread schedules can reveal and verify otherwise hard to find data races. For each data race we classify its harmfulness based on well-defined attributes and can in most cases identify and report its root cause, i.e. the data race which, when fixed, protects the program from crashing. This and a low false positive rate in the reports greatly reduces the overhead in fixing data races for developers.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信