paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Thanos: DBMS Bug Detection via Storage Engine Rotation Based Differential Testing

Thanos:基于存储引擎轮换的差分测试进行 DBMS 缺陷检测
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 1/10 · 该论文研究数据库管理系统的差分测试与模糊测试,属于软件测试领域,不涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户的研究画像核心方向无实质关联。引用 2 inbox
Ying Fu, Zhiyong Wu, Yuanliang Zhang, Jie Liang, Jingzhou Fu, Yu Jiang, Shanshan Li, Xiangke Liao
crossref: 2026-09-12crossref: 2026-09-12

AI 速览

一句话:提出 Thanos,通过存储引擎轮换构造等价 DBMS 进行差分测试,自动发现数据库系统缺陷。

差分测试是自动化 DBMS 测试中建立测试预言(test oracle)的常用策略,但人工挑选实现多样且输入语法兼容的等价 DBMS 成本很高。本文提出 Thanos,其核心洞察是:同一 DBMS 的不同存储引擎必须在基本存储功能上保持一致,因此可通过存储引擎轮换来构造等价 DBMS。Thanos 依次完成存储引擎选择、等价信息提取、面向特性的测试用例合成,并将用例发送到采用不同存储引擎的 DBMS 并比较结果。作者在 MySQL、MariaDB 和 Percona 上与 SQLancer、SQLsmith、SQUIRREL 对比,分支覆盖率提升 24%–116%,发现其他 fuzzer 遗漏的缺陷;厂商确认 32 个此前未知缺陷,其中 29 个为 Critical。

问题
差分测试需要等价但实现多样的 DBMS,现有方法依赖大量人工选择兼容系统,难以规模化。
方法
Thanos 利用同一 DBMS 的不同存储引擎应保持基本存储功能一致这一洞察,通过存储引擎轮换构造等价 DBMS,并合成面向特性的 SQL 测试用例进行结果比对。
评估
在 MySQL、MariaDB、Percona 上与三种先进 fuzzer 对比,分支覆盖率提升 24%–116%,且厂商确认 32 个新缺陷,29 个为 Critical。
原文摘要(Abstract)

Differential testing is a prevalent strategy for establishing test oracles in automated DBMS testing. However, meticulously selecting equivalent DBMSs with diverse implementations and compatible input syntax requires huge manual efforts. In this paper, we propose Thanos, a framework that finds DBMS bugs via storage engine rotation based differential testing. Our key insight is that a DBMS with different storage engines must provide consistent basic storage functionalities. Therefore, it's feasible to construct equivalent DBMSs based on storage engine rotation, ensuring that the same SQL test cases to these equivalent DBMSs yield consistent results. The framework involves four main steps: 1) select the appropriate storage engines; 2) extract equivalence information among the selected storage engines; 3) synthesize feature-orient test cases that ensure the DBMS equivalence; and 4) send test cases to the DBMSs with selected storage engines and compare the results. We evaluate Thanos on three widely used and extensively tested DBMSs, namely MySQL, MariaDB, and Percona against state-of-the-art fuzzers SQLancer, SQLsmith, and SQUIRREL. Thanos outperforms them on branch coverage by 24%-116%, and also finds many bugs missed by other fuzzers. More importantly, the vendors have confirmed 32 previously unknown bugs found by Thanos, with 29 verified as Critical.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8762,
  title = {Thanos: DBMS Bug Detection via Storage Engine Rotation Based Differential Testing},
  author = {Ying Fu and Zhiyong Wu and Yuanliang Zhang and Jie Liang and Jingzhou Fu and Yu Jiang and Shanshan Li and Xiangke Liao},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00257}
}