diff options
author | Sachin Setiya <sachinsetia1001@gmail.com> | 2017-02-21 22:37:50 +0530 |
---|---|---|
committer | Sachin Setiya <sachinsetia1001@gmail.com> | 2017-02-21 23:31:47 +0530 |
commit | fbf7661507b46f63d85c31715acad88e2faae381 (patch) | |
tree | 6ed3acfdffe44530d890e55552b41e4cc3590660 | |
parent | 978179a9d4933d3d8d2ac99028798e8a07095dd4 (diff) | |
download | mariadb-git-bb-sachin-5.tar.gz |
MDEV-11718 5.5 rpl and federated tests massively fail in buildbot with valgrindbb-sachin-5
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 <sachinsetia1001@gmail.com>
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 9 | ||||
-rw-r--r-- | mysql-test/valgrind.supp | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 7bbbcead665..91040dc2cfa 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -6190,6 +6190,15 @@ sub valgrind_arguments { { mtr_add_arg($args, "--tool=memcheck"); # From >= 2.1.2 needs this option mtr_add_arg($args, "--leak-check=yes"); + 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"); + } 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"; diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index 154031feb0d..4448f2a069a 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -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 + ... +} |