summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/r/nesting.result
diff options
context:
space:
mode:
authorsjaakola <seppo.jaakola@iki.fi>2020-05-19 11:12:26 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2020-07-22 08:20:10 +0300
commit7bffe468b239645d2f27d1d5625cb9c914ae994d (patch)
treed980763c5d4d0ae5050f146b474d04a8a0cac50a /mysql-test/suite/perfschema/r/nesting.result
parent4ec032b492de5c392f66c9c1764cbf72442ed3a9 (diff)
downloadmariadb-git-7bffe468b239645d2f27d1d5625cb9c914ae994d.tar.gz
MDEV-21910 Deadlock between BF abort and manual KILL commandbb-10.5-MDEV-21910
When high priority replication slave applier encounters lock conflict in innodb, it will force the conflicting lock holder transaction (victim) to rollback. This is a must in multi-master sychronous replication model to avoid cluster lock-up. This high priority victim abort (aka "brute force" (BF) abort), is started from innodb lock manager while holding the victim's transaction's (trx) mutex. Depending on the execution state of the victim transaction, it may happen that the BF abort will call for THD::awake() to wake up the victim transaction for the rollback. Now, if BF abort requires THD::awake() to be called, then the applier thread executed locking protocol of: victim trx mutex -> victim THD::LOCK_thd_data If, at the same time another DBMS super user issues KILL command to abort the same victim, it will execute locking protocol of: victim THD::LOCK_thd_data -> victim trx mutex. These two locking protocol acquire mutexes in opposite order, hence unresolvable mutex locking deadlock may occur. The fix in this commit adds THD::wsrep_aborter flag to synchronize who can kill the victim This flag is set both when BF is called for from innodb and by KILL command. Either path of victim killing will bail out if victim's wsrep_killed is already set to avoid mutex conflicts with the other aborter execution. THD::wsrep_aborter records the aborter THD's ID. This is needed to preserve the right to kill the victim from different locations for the same aborter thread. It is also good error logging, to see who is reponsible for the abort. A new test case was added in galera.galera_bf_kill_debug.test for scenario where wsrep applier thread and manual KILL command try to kill same idle victim
Diffstat (limited to 'mysql-test/suite/perfschema/r/nesting.result')
-rw-r--r--mysql-test/suite/perfschema/r/nesting.result295
1 files changed, 152 insertions, 143 deletions
diff --git a/mysql-test/suite/perfschema/r/nesting.result b/mysql-test/suite/perfschema/r/nesting.result
index e3137d634a6..ba655d3c329 100644
--- a/mysql-test/suite/perfschema/r/nesting.result
+++ b/mysql-test/suite/perfschema/r/nesting.result
@@ -114,152 +114,161 @@ and (end_event_id <= @marker_end)
) all_events
order by relative_event_id asc;
relative_event_id relative_end_event_id event_name comment nesting_event_type relative_nesting_event_id
-0 20 statement/sql/select select "MARKER_BEGIN" as marker NULL NULL
-1 4 stage/sql/starting (stage) STATEMENT 0
+0 21 statement/sql/select select "MARKER_BEGIN" as marker NULL NULL
+1 5 stage/sql/starting (stage) STATEMENT 0
2 2 wait/io/socket/sql/client_connection recv STAGE 1
3 3 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 1
-4 4 wait/io/file/sql/query_log write STAGE 1
-5 5 stage/sql/checking permissions (stage) STATEMENT 0
-6 6 stage/sql/Opening tables (stage) STATEMENT 0
-7 7 stage/sql/After opening tables (stage) STATEMENT 0
-8 8 stage/sql/init (stage) STATEMENT 0
-9 9 stage/sql/Optimizing (stage) STATEMENT 0
-10 10 stage/sql/Executing (stage) STATEMENT 0
-11 11 stage/sql/End of update loop (stage) STATEMENT 0
-12 12 stage/sql/Query end (stage) STATEMENT 0
-13 13 stage/sql/Commit (stage) STATEMENT 0
-14 14 stage/sql/closing tables (stage) STATEMENT 0
-15 15 stage/sql/Starting cleanup (stage) STATEMENT 0
-16 16 stage/sql/Freeing items (stage) STATEMENT 0
-17 17 wait/io/socket/sql/client_connection send STATEMENT 0
-18 18 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 0
-19 20 stage/sql/Reset for next command (stage) STATEMENT 0
-20 20 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 19
-21 21 idle idle NULL NULL
-22 42 statement/sql/select select "This is simple statement one" as payload NULL NULL
-23 26 stage/sql/starting (stage) STATEMENT 22
-24 24 wait/io/socket/sql/client_connection recv STAGE 23
-25 25 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 23
-26 26 wait/io/file/sql/query_log write STAGE 23
-27 27 stage/sql/checking permissions (stage) STATEMENT 22
-28 28 stage/sql/Opening tables (stage) STATEMENT 22
-29 29 stage/sql/After opening tables (stage) STATEMENT 22
-30 30 stage/sql/init (stage) STATEMENT 22
-31 31 stage/sql/Optimizing (stage) STATEMENT 22
-32 32 stage/sql/Executing (stage) STATEMENT 22
-33 33 stage/sql/End of update loop (stage) STATEMENT 22
-34 34 stage/sql/Query end (stage) STATEMENT 22
-35 35 stage/sql/Commit (stage) STATEMENT 22
-36 36 stage/sql/closing tables (stage) STATEMENT 22
-37 37 stage/sql/Starting cleanup (stage) STATEMENT 22
-38 38 stage/sql/Freeing items (stage) STATEMENT 22
-39 39 wait/io/socket/sql/client_connection send STATEMENT 22
-40 40 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 22
-41 42 stage/sql/Reset for next command (stage) STATEMENT 22
-42 42 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 41
-43 43 idle idle NULL NULL
-44 64 statement/sql/select select "This is simple statement two" as payload NULL NULL
-45 48 stage/sql/starting (stage) STATEMENT 44
-46 46 wait/io/socket/sql/client_connection recv STAGE 45
-47 47 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 45
-48 48 wait/io/file/sql/query_log write STAGE 45
-49 49 stage/sql/checking permissions (stage) STATEMENT 44
-50 50 stage/sql/Opening tables (stage) STATEMENT 44
-51 51 stage/sql/After opening tables (stage) STATEMENT 44
-52 52 stage/sql/init (stage) STATEMENT 44
-53 53 stage/sql/Optimizing (stage) STATEMENT 44
-54 54 stage/sql/Executing (stage) STATEMENT 44
-55 55 stage/sql/End of update loop (stage) STATEMENT 44
-56 56 stage/sql/Query end (stage) STATEMENT 44
-57 57 stage/sql/Commit (stage) STATEMENT 44
-58 58 stage/sql/closing tables (stage) STATEMENT 44
-59 59 stage/sql/Starting cleanup (stage) STATEMENT 44
-60 60 stage/sql/Freeing items (stage) STATEMENT 44
-61 61 wait/io/socket/sql/client_connection send STATEMENT 44
-62 62 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 44
-63 64 stage/sql/Reset for next command (stage) STATEMENT 44
-64 64 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 63
-65 65 idle idle NULL NULL
-66 85 statement/sql/select select "This is the first part of a multi query" as payload;
+4 4 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 1
+5 5 wait/io/file/sql/query_log write STAGE 1
+6 6 stage/sql/checking permissions (stage) STATEMENT 0
+7 7 stage/sql/Opening tables (stage) STATEMENT 0
+8 8 stage/sql/After opening tables (stage) STATEMENT 0
+9 9 stage/sql/init (stage) STATEMENT 0
+10 10 stage/sql/Optimizing (stage) STATEMENT 0
+11 11 stage/sql/Executing (stage) STATEMENT 0
+12 12 stage/sql/End of update loop (stage) STATEMENT 0
+13 13 stage/sql/Query end (stage) STATEMENT 0
+14 14 stage/sql/Commit (stage) STATEMENT 0
+15 15 stage/sql/closing tables (stage) STATEMENT 0
+16 16 stage/sql/Starting cleanup (stage) STATEMENT 0
+17 17 stage/sql/Freeing items (stage) STATEMENT 0
+18 18 wait/io/socket/sql/client_connection send STATEMENT 0
+19 19 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 0
+20 21 stage/sql/Reset for next command (stage) STATEMENT 0
+21 21 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 20
+22 22 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 0
+23 23 idle idle NULL NULL
+24 45 statement/sql/select select "This is simple statement one" as payload NULL NULL
+25 29 stage/sql/starting (stage) STATEMENT 24
+26 26 wait/io/socket/sql/client_connection recv STAGE 25
+27 27 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 25
+28 28 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 25
+29 29 wait/io/file/sql/query_log write STAGE 25
+30 30 stage/sql/checking permissions (stage) STATEMENT 24
+31 31 stage/sql/Opening tables (stage) STATEMENT 24
+32 32 stage/sql/After opening tables (stage) STATEMENT 24
+33 33 stage/sql/init (stage) STATEMENT 24
+34 34 stage/sql/Optimizing (stage) STATEMENT 24
+35 35 stage/sql/Executing (stage) STATEMENT 24
+36 36 stage/sql/End of update loop (stage) STATEMENT 24
+37 37 stage/sql/Query end (stage) STATEMENT 24
+38 38 stage/sql/Commit (stage) STATEMENT 24
+39 39 stage/sql/closing tables (stage) STATEMENT 24
+40 40 stage/sql/Starting cleanup (stage) STATEMENT 24
+41 41 stage/sql/Freeing items (stage) STATEMENT 24
+42 42 wait/io/socket/sql/client_connection send STATEMENT 24
+43 43 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 24
+44 45 stage/sql/Reset for next command (stage) STATEMENT 24
+45 45 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 44
+46 46 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 24
+47 47 idle idle NULL NULL
+48 69 statement/sql/select select "This is simple statement two" as payload NULL NULL
+49 53 stage/sql/starting (stage) STATEMENT 48
+50 50 wait/io/socket/sql/client_connection recv STAGE 49
+51 51 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 49
+52 52 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 49
+53 53 wait/io/file/sql/query_log write STAGE 49
+54 54 stage/sql/checking permissions (stage) STATEMENT 48
+55 55 stage/sql/Opening tables (stage) STATEMENT 48
+56 56 stage/sql/After opening tables (stage) STATEMENT 48
+57 57 stage/sql/init (stage) STATEMENT 48
+58 58 stage/sql/Optimizing (stage) STATEMENT 48
+59 59 stage/sql/Executing (stage) STATEMENT 48
+60 60 stage/sql/End of update loop (stage) STATEMENT 48
+61 61 stage/sql/Query end (stage) STATEMENT 48
+62 62 stage/sql/Commit (stage) STATEMENT 48
+63 63 stage/sql/closing tables (stage) STATEMENT 48
+64 64 stage/sql/Starting cleanup (stage) STATEMENT 48
+65 65 stage/sql/Freeing items (stage) STATEMENT 48
+66 66 wait/io/socket/sql/client_connection send STATEMENT 48
+67 67 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 48
+68 69 stage/sql/Reset for next command (stage) STATEMENT 48
+69 69 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 68
+70 70 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 48
+71 71 idle idle NULL NULL
+72 92 statement/sql/select select "This is the first part of a multi query" as payload;
select "And this is the second part of a multi query" as payload;
select "With a third part to make things complete" as payload NULL NULL
-67 71 stage/sql/starting (stage) STATEMENT 66
-68 68 wait/io/socket/sql/client_connection recv STAGE 67
-69 69 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 67
-70 70 wait/io/file/sql/query_log write STAGE 67
-71 71 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 67
-72 72 stage/sql/checking permissions (stage) STATEMENT 66
-73 73 stage/sql/Opening tables (stage) STATEMENT 66
-74 74 stage/sql/After opening tables (stage) STATEMENT 66
-75 75 stage/sql/init (stage) STATEMENT 66
-76 76 stage/sql/Optimizing (stage) STATEMENT 66
-77 77 stage/sql/Executing (stage) STATEMENT 66
-78 78 stage/sql/End of update loop (stage) STATEMENT 66
-79 79 stage/sql/Query end (stage) STATEMENT 66
-80 80 stage/sql/Commit (stage) STATEMENT 66
-81 81 stage/sql/closing tables (stage) STATEMENT 66
-82 82 stage/sql/Starting cleanup (stage) STATEMENT 66
-83 85 stage/sql/Freeing items (stage) STATEMENT 66
-84 84 wait/io/socket/sql/client_connection send STAGE 83
-85 85 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 83
-86 103 statement/sql/select select "And this is the second part of a multi query" as payload;
+73 78 stage/sql/starting (stage) STATEMENT 72
+74 74 wait/io/socket/sql/client_connection recv STAGE 73
+75 75 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 73
+76 76 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 73
+77 77 wait/io/file/sql/query_log write STAGE 73
+78 78 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 73
+79 79 stage/sql/checking permissions (stage) STATEMENT 72
+80 80 stage/sql/Opening tables (stage) STATEMENT 72
+81 81 stage/sql/After opening tables (stage) STATEMENT 72
+82 82 stage/sql/init (stage) STATEMENT 72
+83 83 stage/sql/Optimizing (stage) STATEMENT 72
+84 84 stage/sql/Executing (stage) STATEMENT 72
+85 85 stage/sql/End of update loop (stage) STATEMENT 72
+86 86 stage/sql/Query end (stage) STATEMENT 72
+87 87 stage/sql/Commit (stage) STATEMENT 72
+88 88 stage/sql/closing tables (stage) STATEMENT 72
+89 89 stage/sql/Starting cleanup (stage) STATEMENT 72
+90 92 stage/sql/Freeing items (stage) STATEMENT 72
+91 91 wait/io/socket/sql/client_connection send STAGE 90
+92 92 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 90
+93 110 statement/sql/select select "And this is the second part of a multi query" as payload;
select "With a third part to make things complete" as payload NULL NULL
-87 89 stage/sql/starting (stage) STATEMENT 86
-88 88 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 87
-89 89 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 87
-90 90 stage/sql/checking permissions (stage) STATEMENT 86
-91 91 stage/sql/Opening tables (stage) STATEMENT 86
-92 92 stage/sql/After opening tables (stage) STATEMENT 86
-93 93 stage/sql/init (stage) STATEMENT 86
-94 94 stage/sql/Optimizing (stage) STATEMENT 86
-95 95 stage/sql/Executing (stage) STATEMENT 86
-96 96 stage/sql/End of update loop (stage) STATEMENT 86
-97 97 stage/sql/Query end (stage) STATEMENT 86
-98 98 stage/sql/Commit (stage) STATEMENT 86
-99 99 stage/sql/closing tables (stage) STATEMENT 86
-100 100 stage/sql/Starting cleanup (stage) STATEMENT 86
-101 103 stage/sql/Freeing items (stage) STATEMENT 86
-102 102 wait/io/socket/sql/client_connection send STAGE 101
-103 103 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 101
-104 122 statement/sql/select select "With a third part to make things complete" as payload NULL NULL
-105 106 stage/sql/starting (stage) STATEMENT 104
-106 106 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 105
-107 107 stage/sql/checking permissions (stage) STATEMENT 104
-108 108 stage/sql/Opening tables (stage) STATEMENT 104
-109 109 stage/sql/After opening tables (stage) STATEMENT 104
-110 110 stage/sql/init (stage) STATEMENT 104
-111 111 stage/sql/Optimizing (stage) STATEMENT 104
-112 112 stage/sql/Executing (stage) STATEMENT 104
-113 113 stage/sql/End of update loop (stage) STATEMENT 104
-114 114 stage/sql/Query end (stage) STATEMENT 104
-115 115 stage/sql/Commit (stage) STATEMENT 104
-116 116 stage/sql/closing tables (stage) STATEMENT 104
-117 117 stage/sql/Starting cleanup (stage) STATEMENT 104
-118 118 stage/sql/Freeing items (stage) STATEMENT 104
-119 119 wait/io/socket/sql/client_connection send STATEMENT 104
-120 120 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 104
-121 122 stage/sql/Reset for next command (stage) STATEMENT 104
-122 122 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 121
-123 123 idle idle NULL NULL
-124 144 statement/sql/select select "MARKER_END" as marker NULL NULL
-125 128 stage/sql/starting (stage) STATEMENT 124
-126 126 wait/io/socket/sql/client_connection recv STAGE 125
-127 127 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 125
-128 128 wait/io/file/sql/query_log write STAGE 125
-129 129 stage/sql/checking permissions (stage) STATEMENT 124
-130 130 stage/sql/Opening tables (stage) STATEMENT 124
-131 131 stage/sql/After opening tables (stage) STATEMENT 124
-132 132 stage/sql/init (stage) STATEMENT 124
-133 133 stage/sql/Optimizing (stage) STATEMENT 124
-134 134 stage/sql/Executing (stage) STATEMENT 124
-135 135 stage/sql/End of update loop (stage) STATEMENT 124
-136 136 stage/sql/Query end (stage) STATEMENT 124
-137 137 stage/sql/Commit (stage) STATEMENT 124
-138 138 stage/sql/closing tables (stage) STATEMENT 124
-139 139 stage/sql/Starting cleanup (stage) STATEMENT 124
-140 140 stage/sql/Freeing items (stage) STATEMENT 124
-141 141 wait/io/socket/sql/client_connection send STATEMENT 124
-142 142 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 124
-143 144 stage/sql/Reset for next command (stage) STATEMENT 124
-144 144 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 143
+94 96 stage/sql/starting (stage) STATEMENT 93
+95 95 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 94
+96 96 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 94
+97 97 stage/sql/checking permissions (stage) STATEMENT 93
+98 98 stage/sql/Opening tables (stage) STATEMENT 93
+99 99 stage/sql/After opening tables (stage) STATEMENT 93
+100 100 stage/sql/init (stage) STATEMENT 93
+101 101 stage/sql/Optimizing (stage) STATEMENT 93
+102 102 stage/sql/Executing (stage) STATEMENT 93
+103 103 stage/sql/End of update loop (stage) STATEMENT 93
+104 104 stage/sql/Query end (stage) STATEMENT 93
+105 105 stage/sql/Commit (stage) STATEMENT 93
+106 106 stage/sql/closing tables (stage) STATEMENT 93
+107 107 stage/sql/Starting cleanup (stage) STATEMENT 93
+108 110 stage/sql/Freeing items (stage) STATEMENT 93
+109 109 wait/io/socket/sql/client_connection send STAGE 108
+110 110 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STAGE 108
+111 129 statement/sql/select select "With a third part to make things complete" as payload NULL NULL
+112 113 stage/sql/starting (stage) STATEMENT 111
+113 113 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 112
+114 114 stage/sql/checking permissions (stage) STATEMENT 111
+115 115 stage/sql/Opening tables (stage) STATEMENT 111
+116 116 stage/sql/After opening tables (stage) STATEMENT 111
+117 117 stage/sql/init (stage) STATEMENT 111
+118 118 stage/sql/Optimizing (stage) STATEMENT 111
+119 119 stage/sql/Executing (stage) STATEMENT 111
+120 120 stage/sql/End of update loop (stage) STATEMENT 111
+121 121 stage/sql/Query end (stage) STATEMENT 111
+122 122 stage/sql/Commit (stage) STATEMENT 111
+123 123 stage/sql/closing tables (stage) STATEMENT 111
+124 124 stage/sql/Starting cleanup (stage) STATEMENT 111
+125 125 stage/sql/Freeing items (stage) STATEMENT 111
+126 126 wait/io/socket/sql/client_connection send STATEMENT 111
+127 127 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 111
+128 129 stage/sql/Reset for next command (stage) STATEMENT 111
+129 129 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 128
+130 130 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 111
+131 131 idle idle NULL NULL
+132 153 statement/sql/select select "MARKER_END" as marker NULL NULL
+133 137 stage/sql/starting (stage) STATEMENT 132
+134 134 wait/io/socket/sql/client_connection recv STAGE 133
+135 135 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 133
+136 136 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 133
+137 137 wait/io/file/sql/query_log write STAGE 133
+138 138 stage/sql/checking permissions (stage) STATEMENT 132
+139 139 stage/sql/Opening tables (stage) STATEMENT 132
+140 140 stage/sql/After opening tables (stage) STATEMENT 132
+141 141 stage/sql/init (stage) STATEMENT 132
+142 142 stage/sql/Optimizing (stage) STATEMENT 132
+143 143 stage/sql/Executing (stage) STATEMENT 132
+144 144 stage/sql/End of update loop (stage) STATEMENT 132
+145 145 stage/sql/Query end (stage) STATEMENT 132
+146 146 stage/sql/Commit (stage) STATEMENT 132
+147 147 stage/sql/closing tables (stage) STATEMENT 132
+148 148 stage/sql/Starting cleanup (stage) STATEMENT 132
+149 149 stage/sql/Freeing items (stage) STATEMENT 132
+150 150 wait/io/socket/sql/client_connection send STATEMENT 132
+151 151 wait/synch/mutex/sql/THD::LOCK_thd_kill lock STATEMENT 132
+152 153 stage/sql/Reset for next command (stage) STATEMENT 132
+153 153 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 152
disconnect con1;