LP #1542234: Valgrind + jemalloc 3.6.0 gives spurious warnings. Not seen with jemalloc 4.0.4.
Description
Environment
Smart Checklist
Activity

lpjirasync January 24, 2018 at 9:01 AM
**Comment from Launchpad by: Roel Van de Paar on: 10-02-2016 22:44:35
Would still be good to better understand why we see them in PS 5.7 and not in PS 5.6 nor in MS 5.7

lpjirasync January 24, 2018 at 9:01 AM
**Comment from Launchpad by: Roel Van de Paar on: 08-02-2016 00:12:58
This bug can be actioned after PQA-110 (Test jemalloc 4.0.4 or higher) is done.

lpjirasync January 24, 2018 at 9:01 AM
**Comment from Launchpad by: Roel Van de Paar on: 05-02-2016 11:30:20
jemalloc 4.0.4 fixes the issue.
jemalloc 3.6.0-1.el7, default in Centos 7, has the issue
Hence, this is now a doc bug which must be included in 5.7 docs

lpjirasync January 24, 2018 at 9:01 AM
**Comment from Launchpad by: Roel Van de Paar on: 05-02-2016 11:11:02
Established that issue is 1) MTR reproducible (if LD_PRELOAD is used) 2) jemalloc related (does not reproduce with empty LD_PRELOAD)

lpjirasync January 24, 2018 at 9:01 AM
**Comment from Launchpad by: Roel Van de Paar on: 05-02-2016 10:35:33
PS 5.6 (debug) - clean
MS 5.7 (debug) - clean
Details
Details
Assignee
Reporter

Components
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist

**Reported in Launchpad by Roel Van de Paar last update 10-02-2016 22:44:36
==8635== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==8635== Command: /sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/bin/mysqld --core-file --innodb_buffer_pool_size=2147483648 --basedir=/sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val --tmpdir=/sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/data --datadir=/sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/data --socket=/sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/socket.sock --port=19099 --log-error=/sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/log/master.err
==8635==
==8635== Invalid write of size 8
==8635== at 0x4C2FE87: memset (vg_replace_strmem.c:1094)
==8635== by 0x188D86B: pfs_malloc(PFS_builtin_memory_class*, unsigned long, int) (pfs_global.cc:88)
==8635== by 0x188D97D: pfs_malloc_array(PFS_builtin_memory_class*, unsigned long, unsigned long, int) (pfs_global.cc:136)
==8635== by 0x18900A2: init_instruments(PFS_global_param const*) (pfs_instr.cc:164)
==8635== by 0x189FB19: initialize_performance_schema(PFS_global_param*) (pfs_server.cc:120)
==8635== by 0xE50DA4: mysqld_main(int, char**) (mysqld.cc:4693)
==8635== by 0xE485CF: main (main.cc:25)
==8635== Address 0x8c3a020 is 0 bytes inside a block of size 4,800 free'd
==8635== at 0x18354D3: my_free (my_malloc.c:132)
==8635== by 0x183536B: my_realloc (my_malloc.c:101)
==8635== by 0x1810F07: alloc_dynamic (array.c:161)
==8635== by 0x18145B8: my_hash_insert (hash.c:423)
==8635== by 0x1456756: mysql_add_sys_var_chain(sys_var*) (set_var.cc:442)
==8635== by 0x145585E: sys_var_init() (set_var.cc:60)
==8635== by 0xE50CDA: mysqld_main(int, char**) (mysqld.cc:4677)
==8635== by 0xE485CF: main (main.cc:25)
$ cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
$ valgrind --version
valgrind-3.10.0
$ ls -l /sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/mysql-test/valgrind.supp
rw-rw-r-. 1 roel roel 18957 Jan 27 22:30 /sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/mysql-test/valgrind.supp
Valgrind startup:
valgrind --suppressions=/sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/mysql-test/valgrind.supp --num-callers=40 --show-reachable=yes /sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/bin/mysqld ${MYEXTRA} --core-file --innodb_buffer_pool_size=2147483648 --basedir=/sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val --tmpdir=/sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/data --datadir=/sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/data --socket=/sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/socket.sock --port=19099 --log-error=/sda/PS-mysql-5.7.10-1rc1-linux-x86_64-val/log/master.err 2>&1 &
PS Server version: 5.7.10-1rc1-debug-valgrind MySQL Community Server (GPL) (Valgrind instrumented)