kirancodes.me
To Proof Maintenance & Beyond!

Detecting Isolation Bugs via Transaction Oracle Construction

Wensheng Dou, Ziyu Cui, Qianwang Dai, Jiansen Song, Dong Wang, Yu Gao, Wei Wang, Jun Wei, Lei Chen, Hanmo Wang, Hua Zhong, Tao Huang

Abstract

Transactions are used to maintain the data integrity of databases, and have become an indispensable feature in modern Database Management Systems (DBMSs). Despite extensive efforts in testing DBMSs and verifying transaction processing mechanisms, isolation bugs still exist in widely-used DBMSs when these DBMSs violate their claimed transaction isolation levels. Isolation bugs can cause severe consequences, e.g., incorrect query results and database states. In this paper, we propose a novel transaction testing approach, Transaction oracle construction (Troc), to automatically detect isolation bugs in DBMSs. The core idea of Troc is to decouple a transaction into independent statements, and execute them on their own database views, which are constructed under the guidance of the claimed transaction isolation level. Any divergence between the actual transaction execution and the independent statement execution indicates an isolation bug. We implement and evaluate Troc on three widely-used DBMSs, i.e., MySQL, MariaDB, and TiDB. We have detected 5 previously-unknown isolation bugs in the latest versions of these DBMSs.

BibTeX
@inproceedings{Dou-al:ICSE23,
  author    = {Wensheng Dou and
               Ziyu Cui and
               Qianwang Dai and
               Jiansen Song and
               Dong Wang and
               Yu Gao and
               Wei Wang and
               Jun Wei and
               Lei Chen and
               Hanmo Wang and
               Hua Zhong and
               Tao Huang},
  title     = {Detecting Isolation Bugs via Transaction Oracle Construction},
  booktitle = {ICSE},
  pages     = {1123--1135},
  publisher = {{IEEE}},
  year      = {2023},
}

Related papers