Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
5.5.36, 10.0.9
-
None
-
None
Description
Using mariadb-10.0.9-linux-x86_64.tar.gz.
MariaDB [test]> show global status like 'com_insert';
|
+---------------+--------+
|
| Variable_name | Value |
|
+---------------+--------+
|
| Com_insert | 646298 |
|
+---------------+--------+
|
1 row in set (0.00 sec)
|
|
MariaDB [test]> stop slave;
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [test]> show global status like 'com_insert';
|
+---------------+-------+
|
| Variable_name | Value |
|
+---------------+-------+
|
| Com_insert | 0 |
|
+---------------+-------+
|
1 row in set (0.00 sec)
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Using mariadb-10.0.9-linux-x86_64.tar.gz. MariaDB [test]> show global status like 'com_insert'; +---------------+--------+ | Variable_name | Value | +---------------+--------+ | Com_insert | 646298 | +---------------+--------+ 1 row in set (0.00 sec) MariaDB [test]> stop slave; Query OK, 0 rows affected (0.00 sec) MariaDB [test]> show global status like 'com_insert'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | Com_insert | 0 | +---------------+-------+ 1 row in set (0.00 sec) |
Using mariadb-10.0.9-linux-x86_64.tar.gz. {noformat} MariaDB [test]> show global status like 'com_insert'; +---------------+--------+ | Variable_name | Value | +---------------+--------+ | Com_insert | 646298 | +---------------+--------+ 1 row in set (0.00 sec) MariaDB [test]> stop slave; Query OK, 0 rows affected (0.00 sec) MariaDB [test]> show global status like 'com_insert'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | Com_insert | 0 | +---------------+-------+ 1 row in set (0.00 sec) {noformat} |
Assignee | Elena Stepanova [ elenst ] |
Fix Version/s | 10.0.10 [ 14500 ] | |
Fix Version/s | 5.5.37 [ 15000 ] | |
Affects Version/s | 5.5.36 [ 14600 ] | |
Assignee | Elena Stepanova [ elenst ] | Michael Widenius [ monty ] |
Priority | Blocker [ 1 ] | Critical [ 2 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | defaullt [ 36421 ] | MariaDB v2 [ 43404 ] |
Workflow | MariaDB v2 [ 43404 ] | MariaDB v3 [ 62495 ] |
Comment |
[ The original buildbot test failure can be reproduced easily by injecting the following sleep in the code: {noformat} diff --git a/sql/slave.cc b/sql/slave.cc index 4129c4c..32e6bd4 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4837,6 +4837,7 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME, mysql_cond_broadcast(&rli->stop_cond); DBUG_EXECUTE_IF("simulate_slave_delay_at_terminate_bug38694", sleep(5);); mysql_mutex_unlock(&rli->run_lock); // tell the world we are done +my_sleep(500000); /* Deactivate the parallel replication thread pool, if there are now no more {noformat} ] |
Workflow | MariaDB v3 [ 62495 ] | MariaDB v4 [ 147613 ] |
The problem was introduced in 5.5 tree by the following revision:
revno: 3601
revision-id: wlad@montyprogram.com-20121220231237-0xv7egt3s225bx7j
parent: timour@askmonty.org-20121220203840-ofoavsm70g8ouk0m
committer: Vladislav Vaintroub <wlad@montyprogram.com>
branch nick: 5.5
timestamp: Fri 2012-12-21 00:12:37 +0100
message:
MDEV-3945 - do not hold LOCK_thread_count when freeing THD.
The patch decreases the duration of LOCK_thread_count, so it is not hold during THD destructor and freeing memory.
This mutex now only protects the integrity of threads list, when removing THD from it, and thread_count variable.
The add_to_status() function that updates global status during client disconnect, is now correctly protected by the LOCK_status mutex.
Benchmark : in a "non-persistent" sysbench test (oltp_ro with reconnect after each query), ~ 25% more connects/disconnects were measured
I agree that the effect is bad and must be fixed, but given that it had survived for over an year without affecting anybody heavily enough to be noticed, I demote it from Blocker