Skip to content

Commit

Permalink
MDEV-11718 5.5 rpl and federated tests massively fail in buildbot wit…
Browse files Browse the repository at this point in the history
…h valgrind

Problem:- When MariaDB is compiled with jemalloc support, And we run mtr valgrind
test, valgrind interferes with libjemalloc and returns false errors.

Solution:- Run valgrind with --soname-synonyms=somalloc=libjemalloc* or
--soname-synonyms=somalloc=NONE depending on whether we are dynamically
linking or statically linking.

Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
  • Loading branch information
mariadb-SachinSetiya committed Feb 22, 2017
1 parent cf673ad commit 32591b7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6193,6 +6193,15 @@ sub valgrind_arguments {
mtr_add_arg($args, "--num-callers=16");
mtr_add_arg($args, "--suppressions=%s/valgrind.supp", $glob_mysql_test_dir)
if -f "$glob_mysql_test_dir/valgrind.supp";
my $temp= `ldd $ENV{MTR_BINDIR}/sql/mysqld | grep 'libjemalloc'`;
if ($temp)
{
mtr_add_arg($args, "--soname-synonyms=somalloc=libjemalloc*");
}
else
{
mtr_add_arg($args, "--soname-synonyms=somalloc=NONE");
}
}

# Add valgrind options, can be overriden by user
Expand Down
10 changes: 10 additions & 0 deletions mysql-test/valgrind.supp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,3 +1074,13 @@
...
fun:pthread_create*
}

{
Memory Leak in loader and valgrind malloc
Memcheck:Leak
match-leak-kinds:reachable
obj:*/vgpreload_memcheck*.so
...
obj:*/ld-*.so
...
}

0 comments on commit 32591b7

Please sign in to comment.