# Copyright (C) 2008 Sun Microsystems, Inc. All rights reserved. Use # is subject to license terms. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 # USA # Configuration file template for util/bughunt.pl # # Please # - copy this file to for example bughunt1.cfg and # - adjust the settings so that they fit to your usage case and # environment # { # desired_status_codes #--------------------- # List of status codes we are hunting for. # Status codes are described in lib/GenTest/Constants.pm # STATUS_ANY_ERROR means any RQG error like for example deadlock or server crash. # desired_status_codes => [+STATUS_ANY_ERROR], # expected_output #---------------- # String pattern which needs to occur within the RQG output. # The search pattern is usually derived from a backtrace. # Example 1: # Starting point is a crash of a server which was compiled with debug. # @expected_output => # [ # 'mysql_execute_command .* at sql_parse.cc\:4441', # 'mysql_parse .* at sql_parse.cc\:5991', # 'dispatch_command .* at sql_parse.cc\:1074' # ]; # Please be careful when using source file line numbers in search patterns # - They increase the selectivity of the search. # - There is a significant risk that the line numbers do no more fit # if the source code of the server gets changed. # Example 2: # Starting point is a crash of a server which was compiled without debug. # expected_output => [ # '0x0000000000413f61', # '0x00000000004429a0', # '0x0000000000453f0f' # ] # Just some adresses looks ugly but it works quite good. # Example 3: # If you just hunt for some status code ( -> desired_status_codes ) use # expected_output => [ ] # expected_outputs => [ '' ], # grammar #-------- # RQG grammar file which should be used for the bug hunting process. # grammar => 'conf/runtime/performance_schema.yy', # gendata => 'conf/runtime/WL5004_data.zz', # rqg_options #------------ # runall.pl (RQG) options which should be used # rqg_options => { # rpl_mode => 'mixed', threads => 16, queries => 10000, duration => 1200, reporter => 'Deadlock,Backtrace,ErrorLog' }, # basedir #-------- # Main installation directory of the server software # basedir => '/work2/repo/mysql-trunk', # basedir => '/work2/repo/mysql-trunk-bugfixing', # Mysqld options #--------------- # Mysql server options passed to RQG in addition to the rqg_options # mysqld => { 'loose-innodb-lock-wait-timeout' => 1, 'lock-wait-timeout' => 1, # The defaults: # performance_schema_events_waits_history_long_size 10000 # performance_schema_events_waits_history_size 10 # performance_schema_max_cond_classes 80 # performance_schema_max_cond_instances 1000 # performance_schema_max_file_classes 50 # performance_schema_max_file_handles 32768 # performance_schema_max_file_instances 10000 # performance_schema_max_mutex_classes 200 # performance_schema_max_mutex_instances 10000 # performance_schema_max_rwlock_classes 30 # performance_schema_max_rwlock_instances 10000 # performance_schema_max_table_handles 1000 # performance_schema_max_table_instances 500 # performance_schema_max_thread_classes 50 # performance_schema_max_thread_instances 1000 # performance_schema_setup_actors_size 100 # performance_schema_setup_objects_size 100 'performance_schema_events_waits_history_long_size' => 100, 'performance_schema_events_waits_history_size' => 3, 'performance_schema_max_cond_classes' => 9, 'performance_schema_max_cond_instances' => 32, 'performance_schema_max_file_classes' => 7, 'performance_schema_max_file_handles' => 181, 'performance_schema_max_file_instances' => 100, 'performance_schema_max_mutex_classes' => 14, 'performance_schema_max_mutex_instances' => 100, 'performance_schema_max_rwlock_classes' => 6, 'performance_schema_max_rwlock_instances' => 100, 'performance_schema_max_table_handles' => 32, 'performance_schema_max_table_instances' => 24, 'performance_schema_max_thread_classes' => 7, 'performance_schema_max_thread_instances' => 32, 'performance_schema_setup_actors_size' => 10, 'performance_schema_setup_objects_size' => 10, # 'plugin-dir' => '/work2/5.1/mysql-5.1-rep+3/plugin/semisync/.libs', # 'plugin-load' => 'rpl_semi_sync_master=libsemisync_master.so:rpl_semi_sync_slave=libsemisync_slave.so', # 'rpl_semi_sync_master_enabled' => 1, # 'rpl_semi_sync_slave_enabled' => 1, 'log-output' => 'none' }, # trials #------- # This is the number of times the oracle() will run the RQG in order to get to # the desired status code and/or desired string (expected_output). # If an error is sporadic, several runs may be required to show that this error # is present. # The "mask" and "seed" values get incremented per trial. # trials => 50, #-------------------------------------------------------------------------- # PARAMETERS AFFECTING THE VARIATIONS OF THE TEST PERFORMED DURING BUG HUNT #-------------------------------------------------------------------------- # Seed affects which alternative of a grammar element or random value is selected #-------------------------------------------------------------------------------- # The variation of the seed value has a smaller impact than the masking of grammar # element alternatives. # # initial_seed #------------- # Seed value to use for the first RQG run. The seed value changes per RQG run. # initial_seed => 1, # Masking of alternatives within grammar elements #------------------------------------------------ # Masking has a much bigger impact on what gets finally executed than a variation # of the seed value. It could destroy well balanced ratios between for example # DROP and CREATE or DELETE and INSERT. The final outcome might be an exceptional # growth of the stored data or most statements meeting no or empty tables. # If you want to switch off "masking" for all RQG runs than please # set "mask_level => 0" # # mask_level #------------------- # Level within the grammar hierarchy till which masking has to be applied. # This value is to be used for all RQG runs. # A value of 0 causes that no masking will be applied. # Values > 30 affect most probably all grammar elements. # mask_level => 0, # initial_mask #------------- # Masking value to be used for the first RQG run. The mask value changes per RQG run. # Though a value of 0 causes that no masking gets applied for the current RQG run, # a successing run will be withg masking. # initial_mask => 0, # vardir_prefix #-------------- # "Server activity" should happen in "vardir" which is a subdirecty of # "vardir_prefix". # Important points are: # - Sufficient free space within the filesystem # - performance of the filesystem # RQG runs get a significant speed up if a memory based filesystem is used. # # vardir_prefix => '/dev/shm', vardir_prefix => 'var', # storage_prefix #--------------- # Grammars and logs of RQG runs which showed the errors and output we are hunting # for are stored in a subdirectory of "storage_prefix". # storage_prefix => './storage', # search_var_size #---------------- # Number of bytes (counted from the end of the output file) to be used during # search for expected_output We suck the last "search_var_size" Bytes of the file # to be searched into a variable. # A too huge "search_var_size" could cause problems. # The relevant zone within the file is maybe # - smaller # If our search pattern is unfortunately a bit unspecific and if it # could also occur within irrelevant zones of the file than we might # get false positives. Decreasing "search_var_size" might help. # - bigger # We might get false negatives. Increasing "search_var_size" might # help but I am unsure if any OS and PERL implementation supports # such a monstrous variable. # search_var_size => 10000000 }