[MDEV-12496] mtflush thread's hang cause mysqld crash Created: 2017-04-13 Updated: 2020-08-25 Resolved: 2018-03-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication, Storage Engine - XtraDB |
| Affects Version/s: | 10.1.17 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | musazhang | Assignee: | Jan Lindström (Inactive) |
| Resolution: | Cannot Reproduce | Votes: | 1 |
| Labels: | buf_LRU_get_free_block, need_feedback, page_cleaner | ||
| Environment: |
linux |
||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
Problem: thread 8 (page cleaner coordinator thread) wait for -> thread 5 (mtflush_io_thread) wait for -> thread 181 (handle_rpl_parallel_thread) [waiting for free block] For detail stack info, please refer to the attachment. [gdb.txt] Analyze: 1) Coordinator produce work items for mtflush_io_thread ; 579 2) Consumer thread consume thread and send event to Coordinator thread that hasn't call os_event_wait; 3) Coordinator thread call os_event_wait to collect status produced by mtflush_io_thread, but the events sent by mtflush_io_thread has gone before. 4) Coordinator thread will call ib_wqueue_wait(mtflush_ctx->wr_cq) and won't produce work_item of flush jobs, as a result, user threads from client will use of free blocks from buf->free_list; 5) Because of reasons above, mysqld will crash in some reason. the gdb.txt include all threads info. |
| Comments |
| Comment by Jan Lindström (Inactive) [ 2017-07-26 ] |
|
Could you provide your my.cnf file, did you set innodb-use-mtflush=1 ? |
| Comment by musazhang [ 2017-07-27 ] |
|
yes, innodb-use-mtflush=1 |