mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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.
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user