一句话:提出灵活且快速的 PMTest 框架,用两个基本检查器检测持久内存软件的崩溃一致性缺陷。
持久内存使应用可直接在内存中操作持久数据,但确保崩溃一致性困难且易错:程序员需借助底层硬件原语或事务库维护排序与持久性保证,而硬件运行时可重排指令,使测试变得困难。现有测试工具通常仅针对特定崩溃一致性软件或持久内存模型,且性能开销大。本文提出 PMTest,通过提供两个类似断言的软件检查器分别验证排序与持久性保证,并可作为高层检查器的构建块;它通过推断持久顺序而非穷举所有顺序来实现快速测试。在八个程序上,PMTest 发现了 45 个合成崩溃一致性缺陷,并在 PMFS 文件系统及使用 PMDK 的应用中检测到 3 个新缺陷,平均比最先进工具快 7.1 倍。
Recent non-volatile memory technologies such as 3D XPoint and NVDIMMs have enabled persistent memory (PM) systems that can manipulate persistent data directly in memory. This advancement of memory technology has spurred the development of a new set of crash-consistent software (CCS) for PM - applications that can recover persistent data from memory in a consistent state in the event of a crash (e.g., power failure). CCS developed for persistent memory ranges from kernel modules to user-space libraries and custom applications. However, ensuring crash consistency in CCS is difficult and error-prone. Programmers typically employ low-level hardware primitives or transactional libraries to enforce ordering and durability guarantees that are required for ensuring crash consistency. Unfortunately, hardware can reorder instructions at runtime, making it difficult for the programmers to test whether the implementation enforces the correct ordering and durability guarantees. We believe that there is an urgent need for developing a testing framework that helps programmers identify crash consistency bugs in their CCS. We find that prior testing tools lack generality, i.e., they work only for one specific CCS or memory persistency model and/or introduce significant performance overhead. To overcome these drawbacks, we propose PMTest (available at https://pmtest.persistentmemory.org), a crash consistency testing framework that is both flexible and fast. PMTest provides flexibility by providing two basic assertion-like software checkers to test two fundamental characteristics of all CCS: the ordering and durability guarantee. These checkers can also serve as the building blocks of other application-specific, high-level checkers. PMTest enables fast testing by deducing the persist order without exhausting all possible orders. In the evaluation with eight programs, PMTest not only identified 45 synthetic crash consistency bugs, but also detected 3 new bugs in a file system (PMFS) and in applications developed using a transactional library (PMDK), while on average being 7.1× faster than the state-of-the-art tool.
DOI 原文 ·
@inproceedings{paperbot4896,
title = {PMTest},
author = {Sihang Liu and Yizhou Wei and Jishen Zhao and Aasheesh Kolli and Samira Khan},
booktitle = {ASPLOS},
year = {2019},
doi = {10.1145/3297858.3304015}
}