[MDEV-10804] main.stat_tables_par fails sporadically in buildbot Created: 2016-09-13 Updated: 2017-08-17 Resolved: 2017-05-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Tests |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.2.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
|
| Comments |
| Comment by Elena Stepanova [ 2017-01-24 ] | ||||||
|
Still happens. Most recent occurrence: | ||||||
| Comment by Daniel Black [ 2017-02-16 ] | ||||||
|
The diffs are in the results of these two (identical) queries: https://github.com/MariaDB/server/blob/10.2/mysql-test/t/stat_tables_par.test#L147..L154 Seems to be a sparatic error however I did have it once. The removal of the disable_ {result_log|warnings}for connection1/2 before these statements will probably provide the insight required. Both analyze statements should predictably return:
I also noticed the following timeout which is further down in the test:
| ||||||
| Comment by Michael Widenius [ 2017-05-08 ] | ||||||
|
Original bug was fixed as part of | ||||||
| Comment by Michael Widenius [ 2017-05-08 ] | ||||||
|
The reason for this is that the following code almost always causes a deadlock that will eventually be resolved with a timeout: connection con1; connection con2; The deadlock happens because the SELECT will first run and take a read lock for index_stats, then the analyze statement will run and tries to take a write lock on table_stats, column_stats and index_stats. The tests works 'sometimes' depending on lock order in memory, as thr_multi_lock_after_thr_lock was done after the first lock. Can be fixed by adding a new sync point just before all thr locks and ensuring that thr_multi_lock_before_thr_lock is not triggered for the first call. This should work as the bug fix for The attached patch fixes these issues | ||||||
| Comment by Michael Widenius [ 2017-05-11 ] | ||||||
|
Fixed by moving DEBUG_SYNC's to make things predictable and adjusting test This also reduce the time for the test from 300 seconds to a few seconds |