[MDEV-16403] Incorrect synchronisation on srv_running Created: 2018-06-05 Updated: 2020-03-08 Resolved: 2020-03-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2, 10.3, 10.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergey Vojtovich | Assignee: | Sergey Vojtovich |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
In innodb_init() there's wait for thd_destructor_thread startup:
However if thd_destructor_thread dies before loadptr, this becomes dead loop. E.g. server shutdown during InnoDB initialisation? Second problem is in innobase_end(). In fact time to time I get crashes here.
If thd_destructor_thread dies between atomic load and mysql_cond_broadcast(), it'll attempt to broadcast on destroyed cond via freed "running" pointer. The problem is much broader though. Background threads creation/destruction synchronisation is in sorry state. So we need to implement some universally applicable framework. |
| Comments |
| Comment by Sergey Vojtovich [ 2020-03-08 ] |
|
This particular problem was solved by Although there're still 5 types of background threads left: buf_flush_page_cleaner, fil_crypt_thread, recv_writer_thread, trx_rollback_all_recovered, log_scrub_thread. |