Commit 32591b75 authored by Sachin Setiya's avatar Sachin Setiya

MDEV-11718 5.5 rpl and federated tests massively fail in buildbot with 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: default avatarSachin Setiya <sachin.setiya@mariadb.com>
parent cf673ade
...@@ -6193,6 +6193,15 @@ sub valgrind_arguments { ...@@ -6193,6 +6193,15 @@ sub valgrind_arguments {
mtr_add_arg($args, "--num-callers=16"); mtr_add_arg($args, "--num-callers=16");
mtr_add_arg($args, "--suppressions=%s/valgrind.supp", $glob_mysql_test_dir) mtr_add_arg($args, "--suppressions=%s/valgrind.supp", $glob_mysql_test_dir)
if -f "$glob_mysql_test_dir/valgrind.supp"; 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 # Add valgrind options, can be overriden by user
......
...@@ -1074,3 +1074,13 @@ ...@@ -1074,3 +1074,13 @@
... ...
fun:pthread_create* fun:pthread_create*
} }
{
Memory Leak in loader and valgrind malloc
Memcheck:Leak
match-leak-kinds:reachable
obj:*/vgpreload_memcheck*.so
...
obj:*/ld-*.so
...
}
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