Bug #49020 | Semi-sync master crashed with free_pool == NULL, assertion `free_pool_' | ||
---|---|---|---|
Submitted: | 24 Nov 2009 3:51 | Modified: | 13 Feb 2010 3:04 |
Reporter: | Elena Stepanova | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S1 (Critical) |
Version: | 5.5.0 | OS: | Any |
Assigned to: | Zhenxing He | CPU Architecture: | Any |
[24 Nov 2009 3:51]
Elena Stepanova
[24 Nov 2009 8:32]
Elena Stepanova
# Test case: # rpl_semisync.test # run as # perl ./mysql-test-run.pl --mysqld=--binlog_format=row --mysqld=--max_connections=23 rpl_semisync source include/have_binlog_format_row.inc; source include/master-slave.inc; source include/have_innodb.inc; connection slave; INSTALL PLUGIN rpl_semi_sync_slave SONAME 'libsemisync_slave.so'; SET GLOBAL rpl_semi_sync_slave_enabled = 1; connection master; SET GLOBAL event_scheduler = ON; INSTALL PLUGIN rpl_semi_sync_master SONAME 'libsemisync_master.so'; SET GLOBAL rpl_semi_sync_master_enabled = 1; connection slave; STOP SLAVE; START SLAVE; connection master; CREATE TABLE t ( i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f varchar(8) ) ENGINE = InnoDB; INSERT INTO t (f) VALUES ('a'),('a'),('a'),('a'),('a'); INSERT INTO t SELECT i+5, f FROM t; INSERT INTO t SELECT i+10, f FROM t; CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t VALUES (SLEEP(5),CONCAT('ev1_',CONNECTION_ID())); CREATE EVENT ev2 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t VALUES (SLEEP(5),CONCAT('ev2_',CONNECTION_ID())); connection slave; STOP SLAVE IO_THREAD; connection master; sleep 4; let $run = 20; while ($run) { connect (m$run,localhost,root,,); connection m$run; send; eval UPDATE t SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = $run; connection master; dec $run; } sleep 3;
[28 Nov 2009 14:46]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/91996 3123 He Zhenxing 2009-11-28 Bug#49020 Semi-sync master crashed with free_pool == NULL, assertion `free_pool_' Before this patch, semisync assumed transactions running in parallel can not be larger than max_connections, but this is not true when the event scheduler is executing events, and cause semisync run out of preallocated transaction nodes. Fix the problem by allocating transaction nodes dynamically. This patch also fixed a possible deadlock when running UNINSTALL PLUGIN rpl_semi_sync_master and updating in parallel. Fixed by releasing the internal Delegate lock before unlock the plugins. @ plugin/semisync/semisync_master.cc Allocating TranxNode dynamically @ plugin/semisync/semisync_master.h Allocating TranxNode dynamically @ sql/rpl_handler.cc Unlock plugins after we have released the Delegate lock to avoid possible deadlock when uninstalling semisync master plugin and doing update in parallel.
[28 Nov 2009 14:48]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/91997 3123 He Zhenxing 2009-11-28 Bug#49020 Semi-sync master crashed with free_pool == NULL, assertion `free_pool_' Before this patch, semisync assumed transactions running in parallel can not be larger than max_connections, but this is not true when the event scheduler is executing events, and cause semisync run out of preallocated transaction nodes. Fix the problem by allocating transaction nodes dynamically. This patch also fixed a possible deadlock when running UNINSTALL PLUGIN rpl_semi_sync_master and updating in parallel. Fixed by releasing the internal Delegate lock before unlock the plugins. @ mysql-test/suite/rpl/t/rpl_semi_sync_event.test Add test case for bug#49020 @ plugin/semisync/semisync_master.cc Allocating TranxNode dynamically @ plugin/semisync/semisync_master.h Allocating TranxNode dynamically @ sql/rpl_handler.cc Unlock plugins after we have released the Delegate lock to avoid possible deadlock when uninstalling semisync master plugin and doing update in parallel.
[4 Dec 2009 1:47]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/92806 3123 He Zhenxing 2009-12-04 Bug#49020 Semi-sync master crashed with free_pool == NULL, assertion `free_pool_' Before this patch, semisync assumed transactions running in parallel can not be larger than max_connections, but this is not true when the event scheduler is executing events, and cause semisync run out of preallocated transaction nodes. Fix the problem by allocating transaction nodes dynamically. This patch also fixed a possible deadlock when running UNINSTALL PLUGIN rpl_semi_sync_master and updating in parallel. Fixed by releasing the internal Delegate lock before unlock the plugins. @ mysql-test/suite/rpl/t/rpl_semi_sync_event.test Add test case for bug#49020 @ plugin/semisync/semisync_master.cc Allocating TranxNode dynamically @ plugin/semisync/semisync_master.h Allocating TranxNode dynamically @ sql/rpl_handler.cc Unlock plugins after we have released the Delegate lock to avoid possible deadlock when uninstalling semisync master plugin and doing update in parallel.
[4 Dec 2009 2:04]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/92809 3124 He Zhenxing 2009-12-04 [merge] Auto merge fix for Bug#49020
[4 Dec 2009 5:25]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/92816 3124 He Zhenxing 2009-12-04 Post fix for previous patch of Bug#49020 Added back n_frees, use 'clear' instead of 'free' since memory is not freed here. @ plugin/semisync/semisync_master.cc Added back n_frees, use 'clear' instead of 'free' in the message since memory is not freed here.
[4 Dec 2009 5:29]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/92818 3126 He Zhenxing 2009-12-04 [merge] Auto merge postfix of Bug#49020
[4 Dec 2009 5:44]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/92819 3124 He Zhenxing 2009-12-04 Post fix for previous patch of Bug#49020 Added back n_frees, use 'clear' instead of 'free' since memory is not freed here. @ plugin/semisync/semisync_master.cc Added back n_frees, use 'clear' instead of 'free' in the message since memory is not freed here.
[4 Dec 2009 5:46]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/92820 3126 He Zhenxing 2009-12-04 [merge] Auto merge postfix of Bug#49020
[4 Dec 2009 8:06]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/92832 2911 He Zhenxing 2009-12-04 [merge] Auto merge fixes for Bug#49020
[4 Dec 2009 9:54]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/92845 2912 He Zhenxing 2009-12-04 Postfix after merge patch for Bug#49020 @ plugin/semisync/CMakeLists.txt Add mysqlservices to link libraries @ plugin/semisync/Makefile.am Add mysqlservices to link libraries
[4 Dec 2009 9:57]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/92846 3753 He Zhenxing 2009-12-04 [merge] Merge patch for Bug#49020, resolved conflicts on plugin/semisync
[11 Dec 2009 6:02]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091211055901-yp18b3c7xuhl87rf) (version source revid:alik@sun.com-20091211055401-43rjwq7gjed6ds83) (merge vers: 6.0.14-alpha) (pib:13)
[11 Dec 2009 6:03]
Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091211055436-aagpwm5ac26waw4b) (version source revid:alik@sun.com-20091211055436-aagpwm5ac26waw4b) (merge vers: 5.5.0-beta) (pib:13)
[11 Dec 2009 6:05]
Bugs System
Pushed into 5.6.0-beta (revid:alik@sun.com-20091211055628-ltr7fero363uev7r) (version source revid:alik@sun.com-20091211055453-717czhtezc74u8db) (merge vers: 5.6.0-beta) (pib:13)
[16 Dec 2009 2:44]
Paul DuBois
Noted in 5.5.0, 6.0.14 changelogs. Semisynchronous replication could run out of nodes to execute simultaneous transactions if the Event Scheduler was executing events.
[18 Dec 2009 15:43]
Paul DuBois
Removed 5.5.0 changelog entry. In 5.5, semisync replication first appears in 5.5.0, so this bug affects no 5.5.x releases.
[12 Feb 2010 17:41]
Bugs System
Pushed into 5.5.2-m2 (revid:joerg@mysql.com-20100212164100-jnurxdw5z88m472s) (version source revid:joerg@mysql.com-20100212164100-jnurxdw5z88m472s) (merge vers: 5.5.2-m2) (pib:16)