[MDEV-29053] safe_mutex: Trying to destroy a mutex cache->lock that was locked at innobase/fts/fts0fts.cc on shutdown Created: 2022-07-07 Updated: 2022-09-14 Resolved: 2022-09-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Full-text Search, Locking |
| Affects Version/s: | 10.6, 10.7, 10.8, 10.9, 10.10, 10.11 |
| Fix Version/s: | 10.6.10, 10.7.6, 10.8.5, 10.9.3, 10.10.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Roel Van de Paar | Assignee: | Marko Mäkelä |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | locking, not-10.5, regression-10.6, sporadic, stack-smashing | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Debug discussion with Thiru. Seen in bb-10.10-
|
| Comments |
| Comment by Marko Mäkelä [ 2022-07-26 ] | |||||||||||||||||||||||||
|
Roel, can you please try to reproduce this on plain 10.10 or any older main branch? I don’t think that there have been significant changes to this code since 10.6. | |||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-07-26 ] | |||||||||||||||||||||||||
|
marko Agreed it is unlikely bb-10.10- | |||||||||||||||||||||||||
| Comment by Thirunarayanan Balathandayuthapani [ 2022-08-02 ] | |||||||||||||||||||||||||
|
I read the code and don't see any relation between cache->lock and LOCK_global_system_variables. From the error message, shutdown is happening when insert does fts_sync(). I failed to repeat the scenario locally by writing the mtr test case. It would be great if you repeat the issue in plain 10.10 or any branch. | |||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-08-09 ] | |||||||||||||||||||||||||
|
Thank you thiru for the great efforts. | |||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-09-13 ] | |||||||||||||||||||||||||
|
I searched through all trials, and found a new set of occurrences (~5) of 'Found wrong usage of mutex', of which only a single one one reproduced and reduced. Here is the reduced testcase, which looks very similar to the first one added in
This leads to:
| |||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-09-13 ] | |||||||||||||||||||||||||
|
The way in which the testcase is executed may matter significantly. For the above, direct paste into the CLI was used. SOURCE in.sql also seems to work. | |||||||||||||||||||||||||
| Comment by Roel Van de Paar [ 2022-09-13 ] | |||||||||||||||||||||||||
|
I manually rechecked versions affected and can say with a reasonable level of certitude that only 10.6+ is affected. | |||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-09-14 ] | |||||||||||||||||||||||||
|
This test case will only reproduce
If I revert the 10.6 part of the
|