diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-09-16 23:20:57 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-09-16 23:20:57 -0400 |
commit | db2e21bf3ea32115e25bc6d9f67249042f16cadb (patch) | |
tree | 995698c9f4df3ae33865b788429d22f0f5ba6bc5 /sql/wsrep_mysqld.h | |
parent | fd1b2e486a9a81ffb5416e7a0a0d85d15598c77c (diff) | |
download | mariadb-git-db2e21bf3ea32115e25bc6d9f67249042f16cadb.tar.gz |
MDEV-8208: Sporadic SEGFAULT on startup
Problem:
When mysqld starts as a galera node, it creates 2 system threads
(applier & rollbacker) using start_wsrep_THD(). These threads are
created before plugin initialization (plugin_init()) for SST methods
like rsync and xtrabackup.
The threads' initialization itself can proceed in parallel to mysqld's
main thread of execution. As a result, the thread initialization code
(start_wsrep_THD()) can end up accessing some un/partially initialized
structures (like maria_hton, in this particular case) resulting in
segfault.
Solution:
Fixed by calling THD::init_for_queries() (which accesses maria_hton)
only after the plugins have been initialized.
Diffstat (limited to 'sql/wsrep_mysqld.h')
-rw-r--r-- | sql/wsrep_mysqld.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h index dd47d4dc1a4..e6fe0c04fac 100644 --- a/sql/wsrep_mysqld.h +++ b/sql/wsrep_mysqld.h @@ -99,6 +99,7 @@ extern my_bool wsrep_restart_slave; extern my_bool wsrep_restart_slave_activated; extern my_bool wsrep_slave_FK_checks; extern my_bool wsrep_slave_UK_checks; +extern my_bool wsrep_creating_startup_threads; enum enum_wsrep_OSU_method { WSREP_OSU_TOI, WSREP_OSU_RSU }; enum enum_wsrep_sync_wait { |