diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-07-05 19:37:57 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-07-06 11:36:17 +0000 |
commit | 6f1f9114971c3c158e9ac97313c92a24f6554415 (patch) | |
tree | 59ef97fd86eeb3172c4d2466c0f86c2cb23883fc /sql | |
parent | 53d6325db0667c0011db5abfde604b13003a28ad (diff) | |
download | mariadb-git-6f1f9114971c3c158e9ac97313c92a24f6554415.tar.gz |
MDEV-12445 : Rocksdb does not shutdown worker threads and aborts in memleak check on server shutdown
Disable memory leak check in debug server, if rocksdb is loaded.
There is some subtle bug somewhere in 3rd party code we cannot
do much about.
The bug is manifested as follows
Rocksdb does not shutdown worker threads, when plugin is shut down. Thus
OS does not unload the library since there are some active threads using
this library's code. Thus global destructors in the library do not run,
and there is still some memory allocated when server exits.
The workaround disables server's memory leak check, if rocksdb engine was
loaded.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 373f9bae26e..592cf53b5b5 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -365,6 +365,7 @@ static bool volatile select_thread_in_use, signal_thread_in_use; static volatile bool ready_to_exit; static my_bool opt_debugging= 0, opt_external_locking= 0, opt_console= 0; static my_bool opt_short_log_format= 0, opt_silent_startup= 0; +bool my_disable_leak_check= false; uint kill_cached_threads; static uint wake_thread; @@ -2155,7 +2156,7 @@ static void mysqld_exit(int exit_code) shutdown_performance_schema(); // we do it as late as possible #endif set_malloc_size_cb(NULL); - if (!opt_debugging) + if (!opt_debugging && !my_disable_leak_check) { DBUG_ASSERT(global_status_var.global_memory_used == 0); } |