arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2107.03660cs.SEcs.DBcs.PL
收藏

基于重复灵敏度指导的DBMS正确性缺陷检测变换综合

Duplicate-sensitivity Guided Transformation Synthesis for DBMS Correctness Bug Detection

Yushan Zhang, Peisen Yao, Rongxin Wu, Charles Zhang

摘要:

数据库管理系统(DBMS)在从移动应用程序到网上银行的现代软件中发挥着核心作用。DBMS应该为所有应用程序提供正确的数据是至关重要的。当DBMS返回不正确的数据时,就会触发正确性错误。目前的生产级数据库管理系统仍然遭受不足的测试,由于有限的手写测试用例。最近几个作品提出了自动生成许多测试用例的查询转换,一个过程中产生一个等价的查询对和测试的DBMS,通过检查系统是否返回相同的结果集的两个查询。然而,它们仍然严重依赖于手工工作来提供转换,这在很大程度上限制了它们对有效输入查询空间的探索。本文介绍了重复灵敏度指导的变换合成,自动发现新的转换,首先合成许多候选人,然后过滤不等价的。我们的自动合成是通过变异的查询,同时保持其重复的敏感性,这是查询等价的必要条件。在候选合成之后,我们使用查询等价检查器来保持与给定查询等价的突变查询。此外,我们已经实现了我们的想法在一个工具Eqsql,并使用它来测试生产级DBMS。在两个月内,我们在MySQL、TiDB和CynosDB中总共检测到30个新确认的独特错误。

英文摘要:

Database Management System (DBMS) plays a core role in modern software from mobile apps to online banking. It is critical that DBMS should provide correct data to all applications. When the DBMS returns incorrect data, a correctness bug is triggered. Current production-level DBMSs still suffer from insufficient testing due to the limited hand-written test cases. Recently several works proposed to automatically generate many test cases with query transformation, a process of generating an equivalent query pair and testing a DBMS by checking whether the system returns the same result set for both queries. However, all of them still heavily rely on manual work to provide a transformation which largely confines their exploration of the valid input query space. This paper introduces duplicate-sensitivity guided transformation synthesis which automatically finds new transformations by first synthesizing many candidates then filtering the nonequivalent ones. Our automated synthesis is achieved by mutating a query while keeping its duplicate sensitivity, which is a necessary condition for query equivalence. After candidate synthesis, we keep the mutant query which is equivalent to the given one by using a query equivalent checker. Furthermore, we have implemented our idea in a tool Eqsql and used it to test the production-level DBMSs. In two months, we detected in total 30 newly confirmed and unique bugs in MySQL, TiDB and CynosDB.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑