1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# Configuration file template for util/ml_simplify-grammar_by_pattern.pl
#
# Please
# - copy this file to for example 1.cfg and
# - adjust the settings so that they fit to your usage case and environment
#
use GenTest::Constants;
# $initial_grammar_file -- File which should be used as the base for the simplification process
$initial_grammar_file = 'storage/1255441539/6.yy';
# @expected_output -- List of string patterns which all need to occur within the RQG output after
# a successful simplification. Usual contained within a backtrace.
# 1. Search pattern derived from a backtrace of a server compiled with debug
# Line numbers of source files within the search patterns
# - increase the selectivity
# - change if the corresponding source file gets modified !!
# => If your backtrace belongs to a server compiled from different mysql source do not add
# the line numbers.
# @expected_output =(
# 'mysql_execute_command .* at sql_parse.cc\:4441',
# 'mysql_parse .* at sql_parse.cc\:5991',
# 'dispatch_command .* at sql_parse.cc\:1074'
# );
# 2. Search pattern derived from a backtrace of a server compiled without debug
# Here we do not have such nice stuff like routine and source file names.
# I tried a simplifier run with addresses from the backtrace as search pattern
# @expected_output =(
# '0x0000000000413f61',
# '0x00000000004429a0',
# '0x0000000000453f0f'
# );
# and it worked fine.
# 3. If you just hunt for some status code use
# @expected_output =(
# );
@expected_output =(
'mysql_execute_command .* at sql_parse.cc\:4441',
'mysql_parse .* at sql_parse.cc\:5991',
'dispatch_command .* at sql_parse.cc\:1074'
);
# @rqg_options --- runall.pl (RQG) options which should be used
@rqg_options =(
'--basedir=/work2/6.0/mysql-6.0-codebase-bugfixing1/',
'--threads=30',
'--queries=3000',
'--duration=60',
'--mysqld=--table-lock-wait-timeout=1',
'--mysqld=--innodb-lock-wait-timeout=1',
'--mysqld=--log-output=file',
'--reporter=Deadlock,Backtrace,Shutdown',
'--gendata=conf/WL5004_data.zz',
);
# $vardir_prefix -- "Server activity" should happen in vardir.
# vardir is a subdirectory of $vardir_prefix.
# Important points are:
# - free space within the filesystem
# - performance of the filesystem
# Simplification gets a significant speed up if we could use a memory based filesystem.
$vardir_prefix = '/dev/shm';
# $storage -- Where to store and backup results and grammars of the simplification process
$storage = './storage';
# Status codes are described in lib/GenTest/Constants.pm
# STATUS_ANY_ERROR means that any RQG error would cause the simplification to continue,
# e.g. both deadlocks and crashes will be considered together
#
@desired_status_codes = ( STATUS_SERVER_DEADLOCKED );
# $trials -- This is the number of times the oracle() will run the RQG in order to get to the
# desired strings (@expected_output). If the error is sporadic, several runs may be
# required to know if the bug is still present in the simplified grammar or not.
$trials = 10;
# $initial_seed -- Initial seed value to use. This increases the likelihood that the initial
# grammar reaches the desired output.
$initial_seed = 852;
# Set $grammar_flags to GRAMMAR_FLAG_COMPACT_RULES so that rules such as rule: a | a | a | a | a | a | b
# are compressed to rule: a | b before simplification. This will speed up the process as each instance of
# "a" will not be removed separately until they are all gone.
$grammar_flags = GRAMMAR_FLAG_COMPACT_RULES;
# $search_var_size -- Number of bytest (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.
# I fear that this could cause somewhere 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 = 1000000;
|