Commit 818af42f authored by Sergei Golubchik's avatar Sergei Golubchik

new valgrind suppression for ld.so

give mysqld more time to start under valgrind
parent db8f698c
......@@ -40,7 +40,7 @@ BEGIN
eval 'sub USE_NETPING { $use_netping }';
}
sub sleep_until_file_created ($$$);
sub sleep_until_file_created ($$$$);
sub mtr_ping_port ($);
sub mtr_ping_port ($) {
......@@ -102,10 +102,11 @@ sub mtr_ping_port ($) {
# FIXME check that the pidfile contains the expected pid!
sub sleep_until_file_created ($$$) {
sub sleep_until_file_created ($$$$) {
my $pidfile= shift;
my $timeout= shift;
my $proc= shift;
my $warn_seconds = shift;
my $sleeptime= 100; # Milliseconds
my $loops= ($timeout * 1000) / $sleeptime;
......@@ -128,8 +129,8 @@ sub sleep_until_file_created ($$$) {
mtr_debug("Sleep $sleeptime milliseconds waiting for $pidfile");
# Print extra message every 60 seconds
if ( $seconds > 1 && int($seconds * 10) % 600 == 0 && $seconds < $timeout )
# Print extra message every $warn_seconds seconds
if ( $seconds > 1 && $seconds % $warn_seconds == 0 && $seconds < $timeout )
{
my $left= $timeout - $seconds;
mtr_warning("Waited $seconds seconds for $pidfile to be created, " .
......
......@@ -311,6 +311,7 @@ my $valgrind_reports= 0;
my $opt_callgrind;
my %mysqld_logs;
my $opt_debug_sync_timeout= 300; # Default timeout for WAIT_FOR actions.
my $warn_seconds = 60;
sub testcase_timeout ($) {
my ($tinfo)= @_;
......@@ -1737,12 +1738,6 @@ sub command_line_setup {
$opt_valgrind= 1;
$opt_valgrind_mysqld= 1;
$opt_valgrind_mysqltest= 1;
# Increase the timeouts when running with valgrind
$opt_testcase_timeout*= 10;
$opt_suite_timeout*= 6;
$opt_start_timeout*= 10;
}
elsif ( $opt_valgrind_mysqld )
{
......@@ -1755,6 +1750,15 @@ sub command_line_setup {
$opt_valgrind= 1;
}
if ($opt_valgrind)
{
# Increase the timeouts when running with valgrind
$opt_testcase_timeout*= 10;
$opt_suite_timeout*= 6;
$opt_start_timeout*= 10;
$warn_seconds*= 10;
}
if ( $opt_callgrind )
{
mtr_report("Turning on valgrind with callgrind for mysqld(s)");
......@@ -3229,7 +3233,8 @@ sub mysql_server_wait {
return not sleep_until_file_created($mysqld->value('pid-file'),
$opt_start_timeout,
$mysqld->{'proc'});
$mysqld->{'proc'},
$warn_seconds);
}
sub create_config_file_for_extern {
......@@ -5472,7 +5477,8 @@ sub mysqld_start ($$) {
if ( $wait_for_pid_file &&
!sleep_until_file_created($mysqld->value('pid-file'),
$opt_start_timeout,
$mysqld->{'proc'}))
$mysqld->{'proc'},
$warn_seconds))
{
my $mname= $mysqld->name();
mtr_error("Failed to start mysqld $mname with command $exe");
......
......@@ -150,12 +150,12 @@
}
{
strlen/_dl_init_paths/dl_main/_dl_sysdep_start(Cond)
somewhere in ld.so, when loading mysqld
Memcheck:Cond
fun:strlen
fun:_dl_init_paths
...
fun:dl_main
fun:_dl_sysdep_start
fun:_dl_start
}
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment