LeakSanitizer-enabled build fails to bootstrap server for MTR

Bug #1603978 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Invalid
Undecided
Unassigned
5.6
Fix Released
Medium
Laurynas Biveinis
5.7
Invalid
Undecided
Unassigned

Bug Description

Copy of http://bugs.mysql.com/bug.php?id=81674:

[1 Jun 11:12] Laurynas Biveinis
Description:
If the server is built with AddressSanitizer support on a system where LeakSanitizer is enabled too, the resulting server will fail to bootstrap server for MTR

How to repeat:
cmake ... -DWITH_ASAN=ON ...
# Workaround http://bugs.mysql.com/bug.php?id=80014
ASAN_OPTIONS="detect_leaks=0" make -j5
...
$ ./mtr --debug-server 1st
...
Installing system database...
mysql-test-run: *** ERROR: Error executing mysqld --bootstrap
...
var/log/bootstrap.log:

=================================================================
==4792==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 56 byte(s) in 1 object(s) allocated from:
    #0 0x7ff89b72054a in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9854a)
    #1 0x1479423 in ut_malloc_low(unsigned long, unsigned long) /home/laurynas/mysql-server/storage/innobase/ut/ut0mem.cc:104
    #2 0x147b9eb in rbt_create(unsigned long, int (*)(void const*, void const*)) /home/laurynas/mysql-server/storage/innobase/ut/ut0rbt.cc:802
    #3 0x150e7c7 in buf_flush_init_flush_rbt() /home/laurynas/mysql-server/storage/innobase/buf/buf0flu.cc:309
    #4 0x1265654 in recv_sys_init(unsigned long) /home/laurynas/mysql-server/storage/innobase/log/log0recv.cc:394
    #5 0x13fcf86 in innobase_start_or_create_for_mysql() /home/laurynas/mysql-server/storage/innobase/srv/srv0start.cc:2087
    #6 0x11a0857 in innobase_init /home/laurynas/mysql-server/storage/innobase/handler/ha_innodb.cc:3428
    #7 0x5b77ee in ha_initialize_handlerton(st_plugin_int*) /home/laurynas/mysql-server/sql/handler.cc:662
    #8 0x9cbfd6 in plugin_initialize /home/laurynas/mysql-server/sql/sql_plugin.cc:1137
    #9 0x9d8f21 in plugin_init(int*, char**, int) /home/laurynas/mysql-server/sql/sql_plugin.cc:1431
    #10 0x59a8f0 in init_server_components /home/laurynas/mysql-server/sql/mysqld.cc:4866
    #11 0x59a8f0 in mysqld_main(int, char**) /home/laurynas/mysql-server/sql/mysqld.cc:5463
    #12 0x57e50e in main /home/laurynas/mysql-server/sql/main.cc:25
    #13 0x7ff89a1e382f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7ff89b72054a in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9854a)
    #1 0x1479423 in ut_malloc_low(unsigned long, unsigned long) /home/laurynas/mysql-server/storage/innobase/ut/ut0mem.cc:104
    #2 0x147ba2e in rbt_create(unsigned long, int (*)(void const*, void const*)) /home/laurynas/mysql-server/storage/innobase/ut/ut0rbt.cc:808
    #3 0x150e7c7 in buf_flush_init_flush_rbt() /home/laurynas/mysql-server/storage/innobase/buf/buf0flu.cc:309
    #4 0x1265654 in recv_sys_init(unsigned long) /home/laurynas/mysql-server/storage/innobase/log/log0recv.cc:394
    #5 0x13fcf86 in innobase_start_or_create_for_mysql() /home/laurynas/mysql-server/storage/innobase/srv/srv0start.cc:2087
    #6 0x11a0857 in innobase_init /home/laurynas/mysql-server/storage/innobase/handler/ha_innodb.cc:3428
    #7 0x5b77ee in ha_initialize_handlerton(st_plugin_int*) /home/laurynas/mysql-server/sql/handler.cc:662
    #8 0x9cbfd6 in plugin_initialize /home/laurynas/mysql-server/sql/sql_plugin.cc:1137
    #9 0x9d8f21 in plugin_init(int*, char**, int) /home/laurynas/mysql-server/sql/sql_plugin.cc:1431
    #10 0x59a8f0 in init_server_components /home/laurynas/mysql-server/sql/mysqld.cc:4866
    #11 0x59a8f0 in mysqld_main(int, char**) /home/laurynas/mysql-server/sql/mysqld.cc:5463
    #12 0x57e50e in main /home/laurynas/mysql-server/sql/main.cc:25
    #13 0x7ff89a1e382f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x7ff89b72054a in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9854a)
    #1 0x1479423 in ut_malloc_low(unsigned long, unsigned long) /home/laurynas/mysql-server/storage/innobase/ut/ut0mem.cc:104
    #2 0x147bae9 in rbt_create(unsigned long, int (*)(void const*, void const*)) /home/laurynas/mysql-server/storage/innobase/ut/ut0rbt.cc:816
    #3 0x150e7c7 in buf_flush_init_flush_rbt() /home/laurynas/mysql-server/storage/innobase/buf/buf0flu.cc:309
    #4 0x1265654 in recv_sys_init(unsigned long) /home/laurynas/mysql-server/storage/innobase/log/log0recv.cc:394
    #5 0x13fcf86 in innobase_start_or_create_for_mysql() /home/laurynas/mysql-server/storage/innobase/srv/srv0start.cc:2087
    #6 0x11a0857 in innobase_init /home/laurynas/mysql-server/storage/innobase/handler/ha_innodb.cc:3428
    #7 0x5b77ee in ha_initialize_handlerton(st_plugin_int*) /home/laurynas/mysql-server/sql/handler.cc:662
    #8 0x9cbfd6 in plugin_initialize /home/laurynas/mysql-server/sql/sql_plugin.cc:1137
    #9 0x9d8f21 in plugin_init(int*, char**, int) /home/laurynas/mysql-server/sql/sql_plugin.cc:1431
    #10 0x59a8f0 in init_server_components /home/laurynas/mysql-server/sql/mysqld.cc:4866
    #11 0x59a8f0 in mysqld_main(int, char**) /home/laurynas/mysql-server/sql/mysqld.cc:5463
    #12 0x57e50e in main /home/laurynas/mysql-server/sql/main.cc:25
    #13 0x7ff89a1e382f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

SUMMARY: AddressSanitizer: 136 byte(s) leaked in 3 allocation(s).
[1 Jun 11:13] Laurynas Biveinis
A 5.6-only issue; 5.5 and 5.7 bootstrap OK

Tags: asan ci upstream
tags: added: asan ci upstream
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3486

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.