| 1 |
# |
| 2 |
# BUG#27664539 INNODB: ASSERTION FAILURE: BUF0FLU.CC:457: |
| 3 |
# (BUF_POOL->FLUSH_LIST).START == __NULL |
| 4 |
# |
| 5 |
# |
| 6 |
# Scenario 1.1.1 - No-redo dirtied page inserted too quickly. |
| 7 |
# Non-empty flush list when it is inserted. |
| 8 |
# The page is no-redo dirtied first time. |
| 9 |
# |
| 10 |
# |
| 11 |
# 0. Block log.recent_closed.tail() from advancing by stopping single mtr |
| 12 |
# just before it inserts its dirty pages to flush list. |
| 13 |
# |
| 14 |
# |
| 15 |
# 1. Optionally modify no-redo dirtied page (then it is later remodified). |
| 16 |
# |
| 17 |
# |
| 18 |
# 2. Gather threads that try to insert dirtied pages with underlying redo |
| 19 |
# records that protect the changes. |
| 20 |
# |
| 21 |
# |
| 22 |
# 3. Wait gathering such threads until more data is written to log buffer. |
| 23 |
# Wait until current lsn is greater than log.recent_closed.tail() by |
| 24 |
# more than capacity of log.recent_closed. |
| 25 |
# |
| 26 |
include/assert.inc [We must advance current lsn by more than maximum flush order lag.] |
| 27 |
# |
| 28 |
# 4. Execute mini-transactions with no-redo dirtied pages (MTR_LOG_NO_REDO). |
| 29 |
# |
| 30 |
# When bug was present, such mtr inserted pages with too big lsn using |
| 31 |
# current lsn, which does not fit space in log.recent_closed, bypassing |
| 32 |
# required wait for space there (thanks to MTR_LOG_NO_REDO). |
| 33 |
# |
| 34 |
# |
| 35 |
# 5. Resume the old mtr which blocked the log.recent_closed.tail() from advancing. |
| 36 |
# |
| 37 |
# |
| 38 |
# 6. Disconnect pending connections. |
| 39 |
# |
| 40 |
# |
| 41 |
# 7. Perform standard mtrs, just to ensure all is fine. |
| 42 |
# |
| 43 |
include/assert.inc [We must not have oldest_lsn_approx < checkpoint_lsn.] |
| 44 |
# Kill and restart |
| 45 |
# |
| 46 |
# Scenario 1.1.2 - No-redo dirtied page inserted too quickly. |
| 47 |
# Non-empty flush list when it is inserted. |
| 48 |
# The page is no-redo dirtied second time. |
| 49 |
# |
| 50 |
# |
| 51 |
# 0. Block log.recent_closed.tail() from advancing by stopping single mtr |
| 52 |
# just before it inserts its dirty pages to flush list. |
| 53 |
# |
| 54 |
# |
| 55 |
# 1. Optionally modify no-redo dirtied page (then it is later remodified). |
| 56 |
# |
| 57 |
# |
| 58 |
# 2. Gather threads that try to insert dirtied pages with underlying redo |
| 59 |
# records that protect the changes. |
| 60 |
# |
| 61 |
# |
| 62 |
# 3. Wait gathering such threads until more data is written to log buffer. |
| 63 |
# Wait until current lsn is greater than log.recent_closed.tail() by |
| 64 |
# more than capacity of log.recent_closed. |
| 65 |
# |
| 66 |
include/assert.inc [We must advance current lsn by more than maximum flush order lag.] |
| 67 |
# |
| 68 |
# 4. Execute mini-transactions with no-redo dirtied pages (MTR_LOG_NO_REDO). |
| 69 |
# |
| 70 |
# When bug was present, such mtr inserted pages with too big lsn using |
| 71 |
# current lsn, which does not fit space in log.recent_closed, bypassing |
| 72 |
# required wait for space there (thanks to MTR_LOG_NO_REDO). |
| 73 |
# |
| 74 |
# |
| 75 |
# 5. Resume the old mtr which blocked the log.recent_closed.tail() from advancing. |
| 76 |
# |
| 77 |
# |
| 78 |
# 6. Disconnect pending connections. |
| 79 |
# |
| 80 |
# |
| 81 |
# 7. Perform standard mtrs, just to ensure all is fine. |
| 82 |
# |
| 83 |
include/assert.inc [We must not have oldest_lsn_approx < checkpoint_lsn.] |
| 84 |
# Kill and restart |
| 85 |
# |
| 86 |
# Scenario 1.2.1 - No-redo dirtied page inserted too quickly. |
| 87 |
# Empty flush list when it is inserted. |
| 88 |
# The page is no-redo dirtied first time. |
| 89 |
# |
| 90 |
# |
| 91 |
# 0. Block log.recent_closed.tail() from advancing by stopping single mtr |
| 92 |
# just before it inserts its dirty pages to flush list. |
| 93 |
# |
| 94 |
# |
| 95 |
# 1. Frozen recent_closed. |
| 96 |
# |
| 97 |
# |
| 98 |
# 2. Optionally modify no-redo dirtied page (in which case next time we remodify it) |
| 99 |
# Note it will be flushed meanwhile anyway. |
| 100 |
# |
| 101 |
# |
| 102 |
# 3. Start transactions and open tables. |
| 103 |
# |
| 104 |
# |
| 105 |
# 4. Keep modifying pages, stop just before we reach limit in recent_closed. |
| 106 |
# |
| 107 |
# |
| 108 |
# 5. Flush all dirty pages to make flush list empty. |
| 109 |
# |
| 110 |
# |
| 111 |
# 6. Execute multiple mtr, stopping them before they add any pages... |
| 112 |
# |
| 113 |
# |
| 114 |
# 7. Wait until we run out of free space in recent_closed... |
| 115 |
# |
| 116 |
# |
| 117 |
# 8. Execute mini-transactions with no-redo dirtied pages (MTR_LOG_NO_REDO). |
| 118 |
# When bug was present, such mtr inserted pages with too big lsn using |
| 119 |
# current lsn, which does not fit space in log.recent_closed, bypassing |
| 120 |
# required wait for space there (thanks to MTR_LOG_NO_REDO). |
| 121 |
# |
| 122 |
# |
| 123 |
# 9. Resume log.recent_closed |
| 124 |
# |
| 125 |
# |
| 126 |
# 10. Finish pending mini-transactions |
| 127 |
# |
| 128 |
# |
| 129 |
# 11. Perform standard mtrs, just to ensure all is fine. |
| 130 |
# |
| 131 |
include/assert.inc [We must not have oldest_lsn_approx < checkpoint_lsn.] |
| 132 |
# Kill and restart |
| 133 |
# |
| 134 |
# Scenario 1.2.2 - No-redo dirtied page inserted too quickly. |
| 135 |
# Empty flush list when it is inserted. |
| 136 |
# The page is no-redo dirtied second time, |
| 137 |
# but it was flushed (empty flush list). |
| 138 |
# |
| 139 |
# |
| 140 |
# 0. Block log.recent_closed.tail() from advancing by stopping single mtr |
| 141 |
# just before it inserts its dirty pages to flush list. |
| 142 |
# |
| 143 |
# |
| 144 |
# 1. Frozen recent_closed. |
| 145 |
# |
| 146 |
# |
| 147 |
# 2. Optionally modify no-redo dirtied page (in which case next time we remodify it) |
| 148 |
# Note it will be flushed meanwhile anyway. |
| 149 |
# |
| 150 |
# |
| 151 |
# 3. Start transactions and open tables. |
| 152 |
# |
| 153 |
# |
| 154 |
# 4. Keep modifying pages, stop just before we reach limit in recent_closed. |
| 155 |
# |
| 156 |
# |
| 157 |
# 5. Flush all dirty pages to make flush list empty. |
| 158 |
# |
| 159 |
# |
| 160 |
# 6. Execute multiple mtr, stopping them before they add any pages... |
| 161 |
# |
| 162 |
# |
| 163 |
# 7. Wait until we run out of free space in recent_closed... |
| 164 |
# |
| 165 |
# |
| 166 |
# 8. Execute mini-transactions with no-redo dirtied pages (MTR_LOG_NO_REDO). |
| 167 |
# When bug was present, such mtr inserted pages with too big lsn using |
| 168 |
# current lsn, which does not fit space in log.recent_closed, bypassing |
| 169 |
# required wait for space there (thanks to MTR_LOG_NO_REDO). |
| 170 |
# |
| 171 |
# |
| 172 |
# 9. Resume log.recent_closed |
| 173 |
# |
| 174 |
# |
| 175 |
# 10. Finish pending mini-transactions |
| 176 |
# |
| 177 |
# |
| 178 |
# 11. Perform standard mtrs, just to ensure all is fine. |
| 179 |
# |
| 180 |
include/assert.inc [We must not have oldest_lsn_approx < checkpoint_lsn.] |
| 181 |
# Kill and restart |
| 182 |
# |
| 183 |
# Scenario 2.1.1 - No-redo dirtied page inserted too late. |
| 184 |
# Non-empty flush list when it is inserted. |
| 185 |
# The page is no-redo dirtied first time. |
| 186 |
# |
| 187 |
# |
| 188 |
# 0. Freeze single no-redo mtr (MTR_LOG_NO_REDO) in mtr0mtr.cc, just |
| 189 |
# before it inserts the dirty page to flush list. |
| 190 |
# |
| 191 |
# |
| 192 |
# 1. Allow user threads to execute many redo-based mini-transactions, |
| 193 |
# until current lsn is greater than init_lsn by more than capacity |
| 194 |
# of log.recent_closed. |
| 195 |
# |
| 196 |
# |
| 197 |
# 2. Optionally flush all dirty pages. |
| 198 |
# |
| 199 |
# |
| 200 |
# 3. Resume the frozen no-redo mtr which seems to be too old. |
| 201 |
# |
| 202 |
# |
| 203 |
# 4. Finish pending insertions in redo-based mini-transactions. |
| 204 |
# |
| 205 |
# |
| 206 |
# 5. Execute two standard mini-transactions to ensure all is fine. |
| 207 |
# |
| 208 |
include/assert.inc [We must not have oldest_lsn_approx < checkpoint_lsn.] |
| 209 |
# Kill and restart |
| 210 |
# |
| 211 |
# Scenario 2.1.2 - No-redo dirtied page inserted too late. |
| 212 |
# Non-empty flush list when it is inserted. |
| 213 |
# The page is no-redo dirtied second time. |
| 214 |
# |
| 215 |
# |
| 216 |
# 0. Freeze single no-redo mtr (MTR_LOG_NO_REDO) in mtr0mtr.cc, just |
| 217 |
# before it inserts the dirty page to flush list. |
| 218 |
# |
| 219 |
# |
| 220 |
# 1. Allow user threads to execute many redo-based mini-transactions, |
| 221 |
# until current lsn is greater than init_lsn by more than capacity |
| 222 |
# of log.recent_closed. |
| 223 |
# |
| 224 |
# |
| 225 |
# 2. Optionally flush all dirty pages. |
| 226 |
# |
| 227 |
# |
| 228 |
# 3. Resume the frozen no-redo mtr which seems to be too old. |
| 229 |
# |
| 230 |
# |
| 231 |
# 4. Finish pending insertions in redo-based mini-transactions. |
| 232 |
# |
| 233 |
# |
| 234 |
# 5. Execute two standard mini-transactions to ensure all is fine. |
| 235 |
# |
| 236 |
include/assert.inc [We must not have oldest_lsn_approx < checkpoint_lsn.] |
| 237 |
# Kill and restart |
| 238 |
# |
| 239 |
# Scenario 2.2.1 - No-redo dirtied page inserted too late. |
| 240 |
# Empty flush list when it is inserted. |
| 241 |
# The page is no-redo dirtied first time. |
| 242 |
# |
| 243 |
# |
| 244 |
# 0. Freeze single no-redo mtr (MTR_LOG_NO_REDO) in mtr0mtr.cc, just |
| 245 |
# before it inserts the dirty page to flush list. |
| 246 |
# |
| 247 |
# |
| 248 |
# 1. Allow user threads to execute many redo-based mini-transactions, |
| 249 |
# until current lsn is greater than init_lsn by more than capacity |
| 250 |
# of log.recent_closed. |
| 251 |
# |
| 252 |
# |
| 253 |
# 2. Optionally flush all dirty pages. |
| 254 |
# |
| 255 |
Flush all dirty pages... |
| 256 |
# |
| 257 |
# 3. Resume the frozen no-redo mtr which seems to be too old. |
| 258 |
# |
| 259 |
# |
| 260 |
# 4. Finish pending insertions in redo-based mini-transactions. |
| 261 |
# |
| 262 |
# |
| 263 |
# 5. Execute two standard mini-transactions to ensure all is fine. |
| 264 |
# |
| 265 |
include/assert.inc [We must not have oldest_lsn_approx < checkpoint_lsn.] |
| 266 |
# Kill and restart |
| 267 |
# |
| 268 |
# Scenario 2.2.2 - No-redo dirtied page inserted too late. |
| 269 |
# Empty flush list when it is inserted. |
| 270 |
# The page is no-redo dirtied second time, |
| 271 |
# but it was flushed (empty flush list). |
| 272 |
# |
| 273 |
# |
| 274 |
# 0. Freeze single no-redo mtr (MTR_LOG_NO_REDO) in mtr0mtr.cc, just |
| 275 |
# before it inserts the dirty page to flush list. |
| 276 |
# |
| 277 |
# |
| 278 |
# 1. Allow user threads to execute many redo-based mini-transactions, |
| 279 |
# until current lsn is greater than init_lsn by more than capacity |
| 280 |
# of log.recent_closed. |
| 281 |
# |
| 282 |
# |
| 283 |
# 2. Optionally flush all dirty pages. |
| 284 |
# |
| 285 |
Flush all dirty pages... |
| 286 |
# |
| 287 |
# 3. Resume the frozen no-redo mtr which seems to be too old. |
| 288 |
# |
| 289 |
# |
| 290 |
# 4. Finish pending insertions in redo-based mini-transactions. |
| 291 |
# |
| 292 |
# |
| 293 |
# 5. Execute two standard mini-transactions to ensure all is fine. |
| 294 |
# |
| 295 |
include/assert.inc [We must not have oldest_lsn_approx < checkpoint_lsn.] |
| 296 |
# Kill and restart |
| 297 |
# |
| 298 |
# Scenario 3 - Execute in parallel many redo and no-redo mini-transactions. |
| 299 |
# Freeze and unfreeze recent_closed every 1s. |
| 300 |
# |
| 301 |
# |
| 302 |
# 0. Freeze log.recent_closed. |
| 303 |
# |
| 304 |
# |
| 305 |
# 1. Start threads doing redo-based mtr and threads doing noredo-based mtr. |
| 306 |
# |
| 307 |
# |
| 308 |
# 2. Freeze/unfreeze log_recent_closed every 1s |
| 309 |
# |
| 310 |
Iterations left: 10 - unfreeze... |
| 311 |
Iterations left: 10 - freeze... |
| 312 |
Iterations left: 9 - unfreeze... |
| 313 |
Iterations left: 9 - freeze... |
| 314 |
Iterations left: 8 - unfreeze... |
| 315 |
Iterations left: 8 - freeze... |
| 316 |
Iterations left: 7 - unfreeze... |
| 317 |
Iterations left: 7 - freeze... |
| 318 |
Iterations left: 6 - unfreeze... |
| 319 |
Iterations left: 6 - freeze... |
| 320 |
Iterations left: 5 - unfreeze... |
| 321 |
Iterations left: 5 - freeze... |
| 322 |
Iterations left: 4 - unfreeze... |
| 323 |
Iterations left: 4 - freeze... |
| 324 |
Iterations left: 3 - unfreeze... |
| 325 |
Iterations left: 3 - freeze... |
| 326 |
Iterations left: 2 - unfreeze... |
| 327 |
Iterations left: 2 - freeze... |
| 328 |
Iterations left: 1 - unfreeze... |
| 329 |
Iterations left: 1 - freeze... |
| 330 |
Finished all iterations - unfreeze... |
| 331 |
# |
| 332 |
# 3. Finish pending insertions. |
| 333 |
# |
| 334 |
include/assert.inc [We must not have oldest_lsn_approx < checkpoint_lsn.] |
| 335 |
# Kill and restart |
| 336 |
# |
| 337 |
# CLEANUP |
| 338 |
# |