ICSE2023
Understanding and Detecting On-The-Fly Configuration Bugs
Teng Wang, Zhouyang Jia, Shanshan Li, Si Zheng, Yue Yu, Erci Xu, Shaoliang Peng, Xiangke Liao
12 citations
Abstract
Software systems introduce an increasing number of configuration options to provide flexibility, and support updating the options on the fly to provide persistent services. This mechanism, however, may affect the system reliability, leading to unexpected results like software crashes or functional errors. In this paper, we refer to the bugs caused by on-the-fly configuration updates as on-the-fly configuration bugs, or OCBugs for short. In this paper, we conducted the first in-depth study on 75 real-world OCBugs from 5 widely used systems to understand the symptoms, root causes, and triggering conditions of OCBugs. Based on our study, we designed and implemented PARACHUTE, an automated testing framework to detect OCBugs. Our key insight is that the value of one configuration option, either loaded at the startup phase or updated on the fly, should have the same effects on the target program. PARACHUTE generates tests for onthe-fly configuration updates by mutating the existing tests and conducts differential analysis to identify OCBugs. We evaluated PARACHUTE on 7 real-world software systems. The results show that PARACHUTE detected 75% (42/56) of the known OCBugs, and reported 13 unknown bugs, 11 of which have been confirmed or fixed by developers until the time of writing. Index Terms-on-the-fly configuration updates, bug detection, metamorphic testing ‡ Teng Wang and Zhouyang Jia are co-first authors. * Shanshan Li is the corresponding author. MySQL Bug #28808 log_queries_not_using_indexes dynamic change is ignored Description: The option log_queries_not_using_index can be changed during system running. But it does not change server behavior. Reproduction: 1. Start server with the configuration slow_query_log True log_queries_not_using_indexes False. 2. Update the option: set global log_queries_not_using_indexes=True; 3. Execute operations: CREATE TABLE, INSERT, SELECT. 4. Check slow query log. Patch: sql/mysqld.cc 1 static void get_options(int argc) 2if (opt_log_queries_not_using_indexes) 3 -opt_specialflag |= NO_INDEX; sql/sql_parse.cc 4 void log_slow_statement(THD *thd) 5 if (thd->enable_slow_log && 6 -(opt_specialflag & NO_INDEX) 7 + opt_log_queries_not_using_indexes