Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Cannot Reproduce
-
10.1.17
-
linux
Description
Problem:
There is a dead lock between sql thread , page cleaner work thread and page cleaner worker thread, there are three threads involved.
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:
There is a problem between Pager cleaner Coordinator thread and worker threads (mtflush_io_thread) . that is, coordinator may miss os_event_set from mtflush_io_thread and caused mysqld to crash, take the situation bellow for example:
1) Coordinator produce work items for mtflush_io_thread ;
562 for(i=0;i<buf_pool_inst; i++)
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.
Attachments
Issue Links
- is duplicated by
-
MDEV-12722 Maria DB 10.1.16 freeze
- Closed
- relates to
-
MDEV-10843 XtraDB Semaphore Stalls with innodb_use_mtflush enabled
- Closed
-
MDEV-14497 rpl.rpl_gtid_reconnect failed in buildbot, lost connection to server
- Closed