1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00
Files
mariadb/mysql-test/t
Andrei Elkin d38e62634f Bug #38694 Race condition in replication thread shutdown
The issue of the current bug is unguarded access to mi->slave_running 
by the shutdown thread calling end_slave() that is bug#29968 
(alas happened not to be cross-linked with the current bug)

Fixed:

with removing the unguarded read of the running status
and perform reading it in terminate_slave_thread()
at time run_lock is taken (mostly bug#29968 backporting, still with some
improvements over that patch - see the error reporting from 
terminate_slave_thread()).
Issue of bug#38716 is fixed here for 5.0 branch as well.

Note:

There has been a separate artifact identified - 
a race condition between init_slave() and  end_slave() - 
reported as  Bug#44467.

mysql-test/r/rpl_bug38694.result:
  a new results file is added.
mysql-test/t/rpl_bug38694-slave.opt:
  simulating delay at slave threads shutdown.
mysql-test/t/rpl_bug38694.test:
  A new test to check if a delay at the termination phase of slave threads
  could cause any issue.
sql/slave.cc:
  The unguarded read of the running status is removed. Its reading is done in
  terminate_slave_thread() at time run_lock is taken;
  Calling terminate_slave_threads(skip_lock := !need_slave_mutex) in the failing branch of start_slave_threads() which is bug#38716 issue.
sql/slave.h:
  removing terminate_slave_thread() out of the global interface scope.
2009-04-28 14:46:07 +03:00
..
2008-01-27 16:41:29 +01:00
2007-11-06 20:31:40 +02:00
2007-08-07 05:35:20 -04:00
2007-06-28 16:03:01 -07:00
2007-07-06 11:35:10 -07:00
2007-07-06 11:35:10 -07:00
2009-02-06 18:25:08 +01:00
2009-02-09 21:52:40 +01:00
2007-07-11 18:45:35 -07:00
2007-06-21 21:39:52 -04:00
2007-11-02 13:40:34 +03:00
2007-11-02 13:40:34 +03:00
2009-03-24 23:50:59 +03:00
2007-08-31 16:59:07 +05:00
2007-11-05 20:18:22 +01:00
2007-10-26 08:42:33 +02:00
2008-01-27 16:41:29 +01:00
2007-11-05 20:18:22 +01:00
2008-01-22 14:18:47 +01:00
2007-11-20 20:15:20 +04:00
2009-02-25 11:37:30 +01:00
2007-11-30 18:06:28 +01:00
2008-08-22 19:49:51 +02:00
2008-04-04 01:16:55 +04:00
2008-04-04 01:16:55 +04:00
2007-08-22 15:43:16 +03:00
2007-06-06 18:55:21 +05:00
2009-02-09 21:52:40 +01:00
2007-07-22 18:26:16 -07:00
2008-03-14 20:51:32 +01:00
2007-07-15 21:51:36 +04:00
2009-03-27 15:58:34 +03:00
2007-06-03 14:46:09 +04:00
2008-06-27 20:56:41 +05:00
2008-02-07 02:33:21 +04:00