【24h】

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.
机译:数据争用,即线程对共享变量的不协调的读/写访问,导致程序意外行为,并行共享内存程序的发生在很大程度上取决于执行过程中线程的时间安排和调度。这使得难以手动和自动检测数据争用。相应的工具通常会怀疑太多的代码位置会导致数据争用并错过关键的代码争夺,因为观察到的执行和时序并未提高它们。我们提出了带有POSIX线程的C / C ++代码的方法和工具链,以检测数据竞争并验证其危害。我们使用自动检测和重复测试用例执行,方法是使用覆盖内核空间调度程序的用户空间线程调度程序有意生成特定的线程交织。随着线程调度变得确定性且独立于所使用的系统,线程调度的目标测试可以揭示和验证否则很难找到数据竞争。对于每个数据竞赛,我们都基于定义明确的属性对其危害进行分类,并且在大多数情况下可以识别并报告其根本原因,即数据竞赛,在修复后可以防止程序崩溃。报告中的低误报率以及较低的误报率极大地减少了为开发人员修复数据争用的开销。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号